Module z_filelib

Extra file functions.

Copyright © 2017 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Extra file functions.

Function Index

ensure_dir/1Ensure the directory of a file is present.
os_filename/1Simple escape function for filenames as commandline arguments.

Function Details

ensure_dir/1

ensure_dir(Filename::file:filename_all()) -> ok | {error, term()}

Ensure the directory of a file is present. This will still work if a soft-link in the path refers to a missing directory.

os_filename/1

os_filename(A::string() | binary()) -> string()

Simple escape function for filenames as commandline arguments. foo/"bar.jpg -> "foo/\"bar.jpg"; on windows "foo\\\"bar.jpg" (both including quotes!)


Generated by EDoc