rsim v0.1.0 Rsim.PathBuilder View Source

Responsible for building paths

Link to this section Summary

Functions

Builds key for a storage from provided path

Builds key for a storage from provided path

Builds path to save file temporary

Link to this section Functions

Link to this function key_from_path(path, prefix, id) View Source
key_from_path(String.t(), String.t(), String.t()) :: String.t()

Builds key for a storage from provided path.

“users/id/filename.jpg” == Rsim.PathBuilder.key_from_path(“/path/to/filename.jpg”, “users”, id)

Link to this function key_from_path(path, prefix, id, parent_id) View Source
key_from_path(String.t(), String.t(), String.t(), String.t()) :: String.t()

Builds key for a storage from provided path.

“users/parent_id/id/filename.jpg” == Rsim.PathBuilder.key_from_path(“/path/to/filename.jpg”, “users”, id)

Link to this function tmp_path_from_url(url) View Source
tmp_path_from_url(String.t()) :: String.t()

Builds path to save file temporary

“/tmp/unique_dir/filename.jpg” == Rsim.PathBuilder.tmp_path_from_url(“http://example.com/path/filename.jpg”)