jiwonz/pathfs
v0.6.0-rc.1 ·
luau-path + @lune/fs and some utilities
lune-path-fs
luau-path + @lune/fs and some utilities
v0.6.0-rc.1
Changed
pathfs.normalizePathnow acceptsAsPath.- Rename
pathfs.normalizePathtopathfs.normalize.
Added
- Add some moonwave docs comments (not finished, docs soon)
- Add watch utilities (
pathfs.watchFile,pathfs.watchDirectoriessource credits to ffrostfall)
Note
This library is based on luau-path by seaofvoices
Features
- Includes typed
luau-pathutility (now fully typed) - @lune/fs library but supports path objects (
AsPathobjects which include string andPathobjects) - Does not require
node&npmanymore (now dependencyluau_pathis published to pesde!) - Includes runtime type checkers via greentea.
- Features useful path and fs related utilities (such as
watchFile,Directory,diffand 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))