usermode/library/mcore/src/files.h File Reference

#include "mcore_i.h"
#include "result.h"

Go to the source code of this file.

Functions

void mkdir_r (const char *dir, mode_t mode)
mnemosyne_result_t path2file (char *path, char **file)


Detailed Description

Collects the interfaces which allow the search for and creation of special files for segment management.

Author:
Andres Jaan Tack <tack@cs.wisc.edu>

Definition in file files.h.


Function Documentation

void mkdir_r ( const char *  dir,
mode_t  mode 
)

Creates a directory with the given path. This will create directories to satisfy the full path if necessary.

e.g. mkdir_r("/a/b/c", S_IRWXU), supposing none of a b or c exists, will create a, then a/b, then a/b/c.

Parameters:
dir is the path of the directory to be created. This may be relative or absolute.
mode is a permission setting to fix on the new directory(s). e.g. S_IRWXU

Definition at line 45 of file files.c.

mnemosyne_result_t path2file ( char *  path,
char **  file 
)

Given a full path, finds the last component of it (which is the unqualified file name).

Parameters:
path is a path to a file, whether relative or not. This must not be NULL.
file is an output parameter, set to point to the beginning of the filename component of path. This must not be NULL.
Returns:
M_R_SUCCESS if the routine found a slash and set file. M_R_FAILURE if there was no slash in path; file was not set.

Definition at line 67 of file files.c.


Generated on Sat Apr 23 11:43:36 2011 for Mnemosyne by  doxygen 1.4.7