These functions probes or manipulates the file system and related metadata.
enum cuos_dentry_type_t |
Catogorisation of files, directories, special files.
cuos_dentry_type_t cuos_dentry_type | ( | cu_str_t | path | ) |
The directory entry type of path as on the file system.
Run
cu_call(cb, path)
on each path which is dname or a subdirectory or file under dname, using depth-first with no specific ordering within each directory.
Run
cu_call(cb, path)
on each path which is dname or a subdirectory or file under dname, using a depth-first with collating order of file names within each directory.
True iff path names a detectable directory entry on the local file system, and it is not a broken symbolic link.
True iff path names a detectable directory or link to such on the local file system.
True iff path names a detectable regular file or link to such on the local file system.
True iff path names a detectable symbolic link on the local file system. Returns true also for broken symbolic links.
Create all missing components of path and path itself as a directory.
time_t cuos_mtime | ( | cu_str_t | path | ) |
Return the modification time of path, or 0 if path does not exist. On other errors, write an error message and return 0.
void cuos_prefixsearch_append_all | ( | cucon_list_t | prefixlist, | |
cu_str_t | suffix, | |||
cucon_list_t | result | |||
) |
cu_bool_t cuos_prefixsearch_conj | ( | cucon_list_t | prefixlist, | |
cu_str_t | suffix, | |||
cu_clop(cb, cu_bool_t, cu_str_t result) | ||||
) |
cu_str_t cuos_prefixsearch_first | ( | cucon_list_t | prefixlist, | |
cu_str_t | suffix | |||
) |
Removes path, and if it is a directory, descends and removes all files and subdirectories recursively.
cu_str_t cuos_session_dir | ( | mode_t | mode | ) |
A directory to load and store the state of an interactive application. Before using this function, you must set the application name, e.g. by calling cu_set_application_name. The session directory will typically be $HOME/.appname
. If mode is zero and the directory does not exist, NULL
is returned. If mode is non-zero and the directory does not exist, the directory will be created with that mode (permissions).
cu_str_t cuos_tmp_dir | ( | void | ) |
Returns a temporary directory for the current process, which will be erased at exit.