File system API for Q when/defer-style promises
Open options:
flags
:r
,w
,a
,b
charset
: default ofutf-8
bufferSize
: in bytesmode
: UNIX permissionsbegin
first byte to read (defaults to zero)end
one past the last byte to read.end - begin == length
Functions:
open(path, options)
read(path, options)
write(path, content, options)
append(path, content, options)
NOT TESTEDcopy(source, target)
NOT IMPLEMENTEDlist(path)
listTree(path, guard_opt(path, stat)
)listDirectoryTree(path)
glob(pattern)
NOT IMPLEMENTEDmatch(pattern, file)
NOT IMPLEMENTEDmakeDirectory(path)
makeTree(path)
NOT TESTEDremove(path)
NOT TESTEDremoveTree(path)
NOT TESTEDlink(source, taget)
NOT TESTED (probably safe)chown(path, uid, gid)
NOT TESTED (probably safe)chmod(path, mode)
NOT TESTED (probably safe)stat(path)
statLink(path)
NOT TESTEDstatFd(fd)
NOT TESTEDexists(path)
isFile(path)
isDirectory(path)
lastModified(path)
split(path)
join(paths)
join(...paths)
resolve(...paths)
normal(...paths)
absolute(path)
canonical(path)
readLink(path)
contains(parent, child)
relative(source, target)
relativeFromFile(source, target)
relativeFromDirectory(source, target)
isAbsolute(path)
isRelative(path)
isRoot(path)
root(path)
directory(path)
base(path, extension)
extension(path)
reroot(path_opt)
toObject(path_opt)
Copyright 2009, 2010 Kristopher Michael Kowal MIT License (enclosed)