globlin_fs

Types

An alias for simplifile.FileError needed for the glob methods below.

pub type FileError =
  simplifile.FileError

Used to determine which files should be returned by the glob function.

pub type FileType {
  RegularFiles
  Directories
  AllFiles
}

Constructors

  • RegularFiles

    Regular files that are not directories or symlinks.

  • Directories

    Directories that are not symlinks.

  • AllFiles

    Both regular files and directories that are not symlinks.

Functions

pub fn glob(
  pattern pattern: Pattern,
  returning file_type: FileType,
) -> Result(List(String), FileError)

Use the specified glob pattern to return a list of the expected file type starting from the current working directory.

Note: No order is guaranteed for the resulting path list.

pub fn glob_from(
  pattern pattern: Pattern,
  directory directory: String,
  returning file_type: FileType,
) -> Result(List(String), FileError)

Use the specified glob pattern to return a list of the expected file type starting from the provided directory.

Note: No order is guaranteed for the resulting path list.

Search Document