Skip to content

FileSystem

FileSystem . readFile ( path )  -> string

Parameters

path: string

Returns

string
FileSystem . readDir ( path )  -> { string }

Parameters

path: string

Returns

{ string }
FileSystem . readDirEntries ( path )  -> { { name: string, kind: string } }

Parameters

path: string

Returns

{
{ name: string,
kind: string,
}
FileSystem . stat ( path )  -> { kind: string, modified: number?, size: number? }

Parameters

path: string

Returns

{
kind: string,
modified: number?,
size: number?,
}
FileSystem . watch ( path callback )  -> { stop: () -> () }

Returns

{
{ stop: () -> () } }
FileSystem . writeDir ( path )  -> ()

Parameters

path: string
FileSystem . writeFile ( path contents )  -> ()

Parameters

path: string
contents: string
FileSystem . removeDir ( path )  -> ()

Parameters

path: string
FileSystem . removeFile ( path )  -> ()

Parameters

path: string
FileSystem . isFile ( path )  -> boolean

Parameters

path: string

Returns

boolean
FileSystem . isDir ( path )  -> boolean

Parameters

path: string

Returns

boolean