View Source z_filelib (zotonic_stdlib v1.16.0)
Link to this section Summary
Functions
Ensure the directory of a file is present. This will still work if a soft-link in the path refers to a missing directory.
Simple escape function for command line arguments
Simple escape function for filenames as commandline arguments. foo/"bar.jpg -> "foo/\"bar.jpg"; on windows "foo\\\"bar.jpg" (both including quotes!)
Link to this section Functions
-spec ensure_dir(file:filename_all()) -> ok | {error, term()}.
-spec os_escape(string() | binary() | undefined) -> string().
-spec os_filename(string() | binary()) -> string().