View Source Hologram.Commons.FileUtils (hologram v0.2.0)
Summary
Functions
Lists files nested in the given path or paths. The results are sorted in ascending order. The result doesn't include directories.
Removes the given dir (including all its contents) and creates an empty dir with the same name and path.
Functions
@spec list_files_recursively( Hologram.Commons.Types.file_path() | [Hologram.Commons.Types.file_path()] ) :: [Hologram.Commons.Types.file_path()]
Lists files nested in the given path or paths. The results are sorted in ascending order. The result doesn't include directories.
Examples
iex> list_files_recursively("test/elixir/fixtures/commons/file_utils/list_files_recursively/dir_1")
["test/elixir/fixtures/commons/file_utils/list_files_recursively/dir_1/dir_3/file_5.txt",
"test/elixir/fixtures/commons/file_utils/list_files_recursively/dir_1/dir_3/file_6.txt",
"test/elixir/fixtures/commons/file_utils/list_files_recursively/dir_1/file_3.txt",
"test/elixir/fixtures/commons/file_utils/list_files_recursively/dir_1/file_4.txt"]
@spec recreate_dir(Hologram.Commons.Types.file_path()) :: :ok
Removes the given dir (including all its contents) and creates an empty dir with the same name and path.