cynapses libc directory functions
[cynapses libc API (internal)]

Functions

int c_isdir (const char *path)
int c_mkdirs (const char *path, mode_t mode)
int c_rmdirs (const char *dir)

Function Documentation

int c_isdir ( const char *  path  ) 

Check if a path is a directory.

Parameters:
path The path to check.
Returns:
1 if the path is a directory, 0 if the path doesn't exist, is a file or can't be accessed.
int c_mkdirs ( const char *  path,
mode_t  mode 
)

Create parent directories as needed.

The newly created directory will be owned by the effective user ID of the process.

Parameters:
path The path to the directory to create.
mode Specifies the permissions to use. It is modified by the process's umask in the usual way: the permissions of the created file are (mode & ~umask).
Returns:
0 on success, < 0 on error with errno set:
  • EACCES The parent directory does not allow write permission to the process, or one of the directories
  • ENOTDIR if durl is not a directory
  • EINVAL NULL durl passed or smbc_init not called.
  • ENOMEM Insufficient memory was available.
See also:
mkdir()
int c_rmdirs ( const char *  dir  ) 

Remove the directory and subdirectories including the content.

This removes all directories and files recursivly.

Parameters:
dir The directory to remove recusively.
Returns:
0 on success, < 0 on error with errno set.
Generated on Mon Jul 5 22:58:35 2010 for doc by  doxygen 1.6.3