data FileErr : Type- Totality: total
Visibility: public export
Constructors:
ReadErr : File t -> FileError -> FileErr WriteErr : File t -> FileError -> FileErr DeleteErr : Path t -> FileError -> FileErr LimitExceeded : File t -> Bits32 -> FileErr CurDir : FileErr ChangeDir : Path t -> FileErr ListDir : Path t -> FileError -> FileErr MkDir : Path t -> FileError -> FileErr
printErr : FileErr -> String- Totality: total
Visibility: export record FS : Type Record representing a simple file system, where we can
read from and write to files.
Totality: total
Visibility: public export
Constructor: MkFS : ((0 t : PathType) -> File t -> String -> IO (Either FileErr ())) -> ((0 t : PathType) -> File t -> String -> IO (Either FileErr ())) -> ((0 t : PathType) -> File t -> IO (Either FileErr ())) -> ((0 t : PathType) -> Path t -> IO (Either FileErr ())) -> ((0 t : PathType) -> Path t -> IO Bool) -> ((0 t : PathType) -> File t -> Bits32 -> IO (Either FileErr String)) -> IO (Either FileErr (Path Abs)) -> ((0 t : PathType) -> Path t -> IO (Either FileErr ())) -> ((0 t : PathType) -> Path t -> IO (Either FileErr (List Body))) -> ((0 t : PathType) -> Path t -> IO (Either FileErr ())) -> FS
Projections:
.append_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Appends the string to the file in question
.changeDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Change to the given directory
.curDir_ : FS -> IO (Either FileErr (Path Abs)) Prints the current working directory.
.exists_ : FS -> (0 t : PathType) -> Path t -> IO Bool Checks if the given file exists in the file system
.listDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr (List Body)) List entries in a directory (without `.` and `..`)
.mkDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Creates the given directory
.read_ : FS -> (0 t : PathType) -> File t -> Bits32 -> IO (Either FileErr String) This tries to read a file in whole, so we have to limit
the acceptable file size, otherwise this might overflow
the computer's memory if presented with an infinite stream
such as `/dev/zero`
.removeDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Deletes the given directory.
.removeFile_ : FS -> (0 t : PathType) -> File t -> IO (Either FileErr ()) Deletes the given file.
.write_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Writes the string to the file in question
.write_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Writes the string to the file in question
Totality: total
Visibility: public exportwrite_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Writes the string to the file in question
Totality: total
Visibility: public export.append_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Appends the string to the file in question
Totality: total
Visibility: public exportappend_ : FS -> (0 t : PathType) -> File t -> String -> IO (Either FileErr ()) Appends the string to the file in question
Totality: total
Visibility: public export.removeFile_ : FS -> (0 t : PathType) -> File t -> IO (Either FileErr ()) Deletes the given file.
Totality: total
Visibility: public exportremoveFile_ : FS -> (0 t : PathType) -> File t -> IO (Either FileErr ()) Deletes the given file.
Totality: total
Visibility: public export.removeDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Deletes the given directory.
Totality: total
Visibility: public exportremoveDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Deletes the given directory.
Totality: total
Visibility: public export.exists_ : FS -> (0 t : PathType) -> Path t -> IO Bool Checks if the given file exists in the file system
Totality: total
Visibility: public exportexists_ : FS -> (0 t : PathType) -> Path t -> IO Bool Checks if the given file exists in the file system
Totality: total
Visibility: public export.read_ : FS -> (0 t : PathType) -> File t -> Bits32 -> IO (Either FileErr String) This tries to read a file in whole, so we have to limit
the acceptable file size, otherwise this might overflow
the computer's memory if presented with an infinite stream
such as `/dev/zero`
Totality: total
Visibility: public exportread_ : FS -> (0 t : PathType) -> File t -> Bits32 -> IO (Either FileErr String) This tries to read a file in whole, so we have to limit
the acceptable file size, otherwise this might overflow
the computer's memory if presented with an infinite stream
such as `/dev/zero`
Totality: total
Visibility: public export.curDir_ : FS -> IO (Either FileErr (Path Abs)) Prints the current working directory.
Totality: total
Visibility: public exportcurDir_ : FS -> IO (Either FileErr (Path Abs)) Prints the current working directory.
Totality: total
Visibility: public export.changeDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Change to the given directory
Totality: total
Visibility: public exportchangeDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Change to the given directory
Totality: total
Visibility: public export.listDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr (List Body)) List entries in a directory (without `.` and `..`)
Totality: total
Visibility: public exportlistDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr (List Body)) List entries in a directory (without `.` and `..`)
Totality: total
Visibility: public export.mkDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Creates the given directory
Totality: total
Visibility: public exportmkDir_ : FS -> (0 t : PathType) -> Path t -> IO (Either FileErr ()) Creates the given directory
Totality: total
Visibility: public exportexists : FS => Path t -> RIO x Bool True if the given file or directory exists in the file system
Totality: total
Visibility: exportfileExists : FS => File t -> RIO x Bool True if the given file exists in the file system
Totality: total
Visibility: exportmissing : FS => Path t -> RIO x Bool True if the given file or directory does not exist in the file system
Totality: total
Visibility: exportfileMissing : FS => File t -> RIO x Bool True if the given file does not exist in the file system
Totality: total
Visibility: exportwrite : FS => Has FileErr xs => File t -> String -> App xs () Writes the given string to a file.
Totality: total
Visibility: exportappend : FS => Has FileErr xs => File t -> String -> App xs () Writes the given string to a file.
Totality: total
Visibility: exportread : FS => Has FileErr xs => File t -> Bits32 -> App xs String Reads a string from a file, the size of which must not
exceed the given number of bytes.
Totality: total
Visibility: exportremoveFile : FS => Has FileErr xs => File t -> App xs () Delete a file from the file system.
Totality: total
Visibility: exportremoveDir : FS => Has FileErr xs => Path t -> App xs () Delete a file from the file system.
Totality: total
Visibility: exportcurDir : FS => Has FileErr xs => App xs (Path Abs) Returns the current directory's path.
Totality: total
Visibility: exportchgDir : FS => Has FileErr xs => Path t -> App xs () Changes the working directory
Totality: total
Visibility: exportinDir : FS => Has FileErr xs => Path t -> App xs a -> App xs a Runs an action in the given directory, changing back
to the current directory afterwards.
Totality: total
Visibility: exportlistDir : FS => Has FileErr xs => Path t -> App xs (List Body) List entries in a directory (without `.` and `..`)
Totality: total
Visibility: exportmkDir : FS => Has FileErr xs => Path t -> App xs () Creates the given directory
Totality: total
Visibility: exportmkDirP : FS => Has FileErr xs => Path t -> App xs () Creates the given directory (including parent directories)
Totality: total
Visibility: exportmkParentDir : FS => Has FileErr xs => File t -> App xs () Creates the parent directory of the given file
Totality: total
Visibility: exportlocal : FS A computer's local file system
Totality: total
Visibility: export