package devkit
Module Devkit_core.FilesSource
File system
f fd path rel gets invoked for each file under dirname where fd is a read-only Unix.file_descr, path is full path and rel - path relative to dirname
iter_names_q dirname (fun [path] [rel] -> ...)
iter_files dirname (fun [path] [ic] -> ...)
mkdir_p ?perm path creates directory path and all missing parent directories. Similar to mkdir -p. Raises Failure if path exists but is not a directory. Default perm is 0o755.
save_as filename ?mode f is similar to Control.with_open_file_bin for regular files, except that writing is done to a temporary file that will be renamed to filename after f has succesfully terminated. Therefore this guarantee that either filename will not be modified or will contain whatever f was writing to it as a side-effect.
There is no such special treatment for special files (Unix.stat kind not S_REG, e.g. devices, pipes, etc), instead they are written to directly. Symlinks are followed (not overwritten in place). Throws Unix.Unix_error on broken symlinks.
FIXME windows