Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

Helper for directory handling
[MNT daemon]

Various helper functions for directories. More...

Functions

int mntd_dir_is_dir (char *dirpath)
 Check if path is a directory.

int mntd_dir_remove (char *dirpath)
 Remove one directory if it is empty.

int mntd_dir_mkdirs (const char *pathname, mode_t mode, int *error)
 Make directories and all missing parent directories.

int mntd_dir_rmdirs (char *dirname)
 Remove directories and file recursivly.


Detailed Description

Various helper functions for directories.


Function Documentation

int mntd_dir_is_dir char *  dirpath  ) 
 

Check if path is a directory.

Parameters:
dirpath Path to directory
Returns:
1 if successful, and 0 otherwise

Definition at line 63 of file mntd_dir.c.

Referenced by mntd_dir_mkdirs(), mntd_dir_remove(), mntd_dir_rmdirs(), and mntd_volume_mount().

int mntd_dir_mkdirs const char *  pathname,
mode_t  mode,
int *  error
 

Make directories and all missing parent directories.

Parameters:
pathname Path to make
mode creating mask of permissions
error Pointer to error return value
Returns:
0 if successful, and 1 otherwise

Definition at line 107 of file mntd_dir.c.

References mntd_dir_is_dir().

Referenced by mntd_volume_mount().

int mntd_dir_remove char *  dirpath  ) 
 

Remove one directory if it is empty.

Parameters:
dirpath Path to directory
Returns:
1 if successful, and 0 otherwise

Definition at line 86 of file mntd_dir.c.

References mntd_dir_is_dir().

Referenced by mntd_volume_mount(), and mntd_volume_umount().

int mntd_dir_rmdirs char *  dirname  ) 
 

Remove directories and file recursivly.

Parameters:
dirname Root directory from which file and directories will be removed recursivly
Returns:
1 if successful, and 0 otherwise

Definition at line 181 of file mntd_dir.c.

References mntd_dir_is_dir(), mntd_file_is_file(), and mntd_file_remove().

Referenced by mntd_volume_mount().


Generated on Thu May 27 23:27:28 2004 for Mntd by doxygen 1.3.5