mist/file

Types

Errors returned from attempting to open a file.

pub type FileError {
  IsDir
  NoAccess
  NoEntry
  UnknownFileError
}

Constructors

  • IsDir
  • NoAccess
  • NoEntry
  • UnknownFileError

Functions

pub fn open(file: BitString) -> Result(FileDescriptor, FileError)

Attemps to open a file at the given path. Returns a FileDescriptor to use with the mist.File response type.

pub fn size(path: BitString) -> Int

Get the file size from a path. Returns 0 if the path does not exist.

Search Document