z_path (zotonic_core v1.0.0-rc.11)
Link to this section Summary
Functions
Return the absolute path to a file in the 'file' directory
Return the _build/default/lib directory
Return the path to a files subdirectory
Return the path to a files subdirectory and ensure that the directory is present
Get the path to the root dir of the Zotonic install. If the env var 'ZOTONIC' is not set, then return the current working dir.
Return the path to the media archive directory
Return the path to the media preview directory
Return the path to the given module in the given context. The module must have been compiled, so it is present in the code path.
Return the path to the site folder of the given context. The site must have been compiled.
Find the source directory of a site.
The directory of the user-defined sites
Link to this section Functions
Link to this function
abspath(Path, Context)
-spec abspath(file:filename_all(), z:context()) -> file:filename_all() | {error, bad_name}.
Link to this function
build_lib_dir()
-spec build_lib_dir() -> file:filename_all().
Link to this function
files_subdir(SubDir, Context)
-spec files_subdir(file:filename_all(), z:context()) -> file:filename_all() | {error, bad_name}.
Link to this function
files_subdir_ensure(SubDir, Context)
-spec files_subdir_ensure(file:filename_all(), z:context()) -> file:filename_all() | {error, bad_name}.
Link to this function
get_path()
-spec get_path() -> file:filename_all().
Link to this function
media_archive(Context)
-spec media_archive(z:context()) -> file:filename_all() | {error, bad_name}.
Link to this function
media_preview(Context)
-spec media_preview(z:context()) -> file:filename_all() | {error, bad_name}.
Link to this function
module_dir(Module)
-spec module_dir(atom()) -> file:filename_all() | {error, bad_name}.
Link to this function
site_dir(Context)
-spec site_dir(z:context() | atom()) -> file:filename_all() | {error, bad_name}.
Link to this function
site_source_dir(Context)
-spec site_source_dir(z:context() | atom()) -> file:filename_all() | {error, bad_name}.
Link to this function
zotonic_apps()
-spec zotonic_apps() -> file:filename_all().