Detailed Description

Modules

 Access
 
 Descriptor Handling
 
 Permissions
 

Functions

int link (const char *old, const char *new)
 
int rename (const char *old, const char *new)
 
int stat (const char *path, struct stat *buf)
 
int symlink (const char *old, const char *new)
 
int mkdir (const char *path, mode_t mode)
 
int rmdir (const char *path)
 

Function Documentation

int link ( const char *  old,
const char *  new 
)

This function creates a hard link between old and new.

Returns
Zero on success or -1 on error with errno (see Error Numbers) set to:
  • ENOTSUP: operation not supported
int mkdir ( const char *  path,
mode_t  mode 
)

This function creates a new directory.

Parameters
pathPath to the new directory
modeIgnored
Returns
Zero on success or -1 with errno (see Error Numbers) set to:
  • ENOENT: path is an empty string or the parent directory cannot be found
  • EEXIST: path already exists
  • ENOSPC: Not enough space on the disk to add a new directory
int rename ( const char *  old,
const char *  new 
)

This functions renames old to new.

Returns
Zero on success or -1 with errno set to:
  • EEXIST: new already exists
  • EIO: IO error
  • ENOENT: old does not exist
  • EACCESS: old or new cannot be written
int rmdir ( const char *  path)

This function removes the directory specified by path.

Returns
Zero on success or -1 with errno (see Error Numbers) set to:
  • ENOENT: path is an empty string or the parent directory cannot be found
  • EEXIST: path already exists
  • ENOTDIR: path is not a directory
  • ENOTEMPTY: path is not an empty directory
int stat ( const char *  path,
struct stat *  buf 
)

This function gets various file statistics for a given file name.

Returns
Zero on success or -1 on error with errno (see Error Numbers) set to:
  • ENAMETOOLONG: path exceeds PATH_MAX or a component of path exceeds NAME_MAX
  • ENOENT: path does not exist
  • EACCES: search permission is denied for a component of path
int symlink ( const char *  old,
const char *  new 
)

This function creates a hard link between old and new.

Returns
Zero on success or -1 on error with errno (see Error Numbers) set to:
  • ENOTSUP: operation not supported