View Source PetalInstaller.FileManager (Petal CLI v0.1.0)
Summary
Functions
Copies a single file
Creates the petal component folder in users' lib/[project_name]_web/components/
Same as File.exists?/1
Gets paths for specified component, in the form {source_path, to_path}
Returns the paths required for copying all components
Gets the required paths for copying css files source_path = deps/petal_components/assets/defaults.css to_path = assets/css/petals_default.css
Same as File.read/1
Same as File.read!/1
Recursively copies all files from source_path into to_path
Saves the project name into FileManager process
Functions
copy(source_path, to_path, error_message \\ "Failed to copy files")
View SourceCopies a single file
Creates the petal component folder in users' lib/[project_name]_web/components/
Same as File.exists?/1
@spec get_app_css_path() :: binary()
Gets paths for specified component, in the form {source_path, to_path}
Returns the paths required for copying all components
returns {source_path, to_path} tuple
Gets the required paths for copying css files source_path = deps/petal_components/assets/defaults.css to_path = assets/css/petals_default.css
returns {source_path, to_path}
@spec get_root_layout_path() :: binary()
Same as File.read/1
Same as File.read!/1
Recursively copies all files from source_path into to_path
@spec set_project_name(String.t()) :: :ok
Saves the project name into FileManager process