Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.38 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.38 KB

lune-path-fs

luau-path + @lune/fs and some utilities

v0.6.0-rc.1

Changed

  • pathfs.normalizePath now accepts AsPath.
  • Rename pathfs.normalizePath to pathfs.normalize.

Added

  • Add some moonwave docs comments (not finished, docs soon)
  • Add watch utilities (pathfs.watchFile, pathfs.watchDirectories source credits to ffrostfall)

Note

This library is based on luau-path by seaofvoices

Features

  • Includes typed luau-path utility (now fully typed)
  • @lune/fs library but supports path objects (AsPath objects which include string and Path objects)
  • Does not require node & npm anymore (now dependency luau_path is published to pesde!)
  • Includes runtime type checkers via greentea.
  • Features useful path and fs related utilities (such as watchFile, Directory, diff and more!)

Installation

Install via pesde

pesde add jiwonz/pathfs -t lune

Usage

local pathfs = require("../lune_packages/pathfs")
local fs = pathfs.fs -- compat with lune's fs lib (@lune/fs)

fs.writeFile("something.json", "{ \"message\": \"Hello, world!\" }")

local path = pathfs.Path.from("something.json")

print(fs.readFile(path))

TO-DOs

  • Generate markdown docs from moonwave comments for pesde docs