loki v1.2.2 Loki.File

Helpers for working with file.

Summary

Functions

copy_file(source, target)
copy_file(Path.t, Path.t) :: :ok | {:error, Atom.t}

Helper for copy files.

copy_file(source, target, opts)
copy_file(Path.t, Path.t, Keyword.t) :: :ok | {:error, Atom.t}
copy_file?(any)
copy_file?(any) :: none
create_file(path)
create_file(Path.t) :: :ok | {:error, Atom.t}
create_file(any) :: none

Helper for create file.

create_file(path, content)
create_file(Path.t, String.t) :: :ok | {:error, Atom.t}
create_file(path, content, opts)
create_file(Path.t, String.t, Keyword.t) ::
  :ok |
  {:error, Atom.t}
create_file?(any)
create_file?(any) :: none
create_file_force(path)
create_file_force(Path.t) :: :ok | {:error, Atom.t}
create_file_force(any) :: none

Helper for create file in force mode.

create_file_force(path, content)
create_file_force(Path.t, String.t) :: :ok | {:error, Atom.t}
create_file_force(path, content, opts)
create_file_force(Path.t, String.t, Keyword.t) ::
  :ok |
  {:error, Atom.t}
create_link(source, link)
create_link(Path.t, Path.t) :: :ok | {:error, Atom.t}

Helper for create link.

create_link(source, link, opts)
create_link(Path.t, Path.t, Keyword.t) ::
  :ok |
  {:error, Atom.t}
exists_file?(path)
exists_file?(Path.t) :: Boolean.t
exists_file?(any) :: none

Helper check if file exists.

identical_file?(any)
identical_file?(any) :: none
identical_file?(path, renderer)
identical_file?(Path.t, Path.t) ::
  Boolean.t |
  {:error, Atom.t}

Helper check if file identical.

remove_file(path)
remove_file(Path.t) :: :ok | {:error, Atom.t}

Helper for remove file.

remove_file(path, opts)
remove_file(Path.t, Keyword.t) :: :ok | {:error, Atom.t}
remove_file?(any)
remove_file?(any) :: none
rename(any)
rename(any) :: none
rename(source, target)
rename(Path.t, Path.t) :: :ok | {:error, String.t}

Helper for rename files and dirs.

rename(source, target, opts)
rename(Path.t, Path.t, Keyword.t) :: :ok | {:error, String.t}