fs

currentDirectory

fun currentDirectory() > str !> FileSystemError, InvalidArgumentError 

Returns current directory absolute path

Returns: current directory

makeDirectory

fun makeDirectory(str path) > void !> FileSystemError, UnexpectedError 

Creates directory path

  • path: directory to create

delete

fun delete(str path) > void !> FileSystemError, UnexpectedError 

Deletes directory or file at path

  • path: direcotry/file to delete

move

fun move(str source, str destination) > void !> FileSystemError, UnexpectedError 

Moves/renames file

  • destination: where to move it

list

fun list(str path) > [str] !> FileSystemError, UnexpectedError 

List files under path

  • path: directory to list

exists

fun exists(str path) > bool !> FileSystemError

Returns true if path exists

  • path: Directory/file to test

Returns: true if file exists

Last Updated:
Contributors: Benoit Giannangeli