Skylib module containing utility functions related to directories.
directory_glob(<a href="#directory_glob-directory">directory</a>, <a href="#directory_glob-include">include</a>, <a href="#directory_glob-allow_empty">allow_empty</a>)
native.glob, but for DirectoryInfo.
PARAMETERS
RETURNS
depset[File] A set of files that match.
directory_glob_chunk(<a href="#directory_glob_chunk-directory">directory</a>, <a href="#directory_glob_chunk-chunk">chunk</a>)
Given a directory and a chunk of a glob, returns possible candidates.
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| directory | (DirectoryInfo) The directory to look relative from. | none |
| chunk | (string) A chunk of a glob to look at. | none |
RETURNS
List[Either[DirectoryInfo, File]]] The candidate next entries for the chunk.
directory_single_glob(<a href="#directory_single_glob-directory">directory</a>, <a href="#directory_single_glob-glob">glob</a>)
Calculates all files that are matched by a glob on a directory.
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| directory | (DirectoryInfo) The directory to look relative from. | none |
| glob | (string) A glob to match. | none |
RETURNS
List[File] A list of files that match.
get_child(<a href="#get_child-directory">directory</a>, <a href="#get_child-name">name</a>, <a href="#get_child-require_dir">require_dir</a>, <a href="#get_child-require_file">require_file</a>)
Gets the direct child of a directory.
PARAMETERS
RETURNS
(File|DirectoryInfo) The content contained within.
get_relative(<a href="#get_relative-directory">directory</a>, <a href="#get_relative-path">path</a>, <a href="#get_relative-require_dir">require_dir</a>, <a href="#get_relative-require_file">require_file</a>)
Gets a subdirectory contained within a tree of another directory.
PARAMETERS
RETURNS
(File|DirectoryInfo) The directory contained within.
transitive_entries(<a href="#transitive_entries-directory">directory</a>)
Returns the files and directories contained within a directory transitively.
PARAMETERS
| Name | Description | Default Value |
|---|---|---|
| directory | (DirectoryInfo) The directory to look at | none |
RETURNS
List[Either[DirectoryInfo, File]] The entries contained within.