next up previous contents index
Next: 7.5.3 link: Link a Up: 7.5 oskit_dir: Directory Interface Previous: 7.5.1 lookup: Look up

7.5.2 create: Create a regular file in this directory

 

SYNOPSIS

#include <oskit/fs/dir.h>

oskit_error_t oskit_dir_create(oskit_dir_t *d, const char *name, oskit_bool_t excl, oskit_mode_t mode, [out] oskit_file_t **out_file);

DIRECTION

client OS tex2html_wrap_inline32841 filesystem library

DESCRIPTION

This method is the same as oskit_dir_lookup, except that if the file does not exist, then a regular file will be created with the specified name and mode.

If a file with name already exists, and excl is TRUE, then OSKIT_EEXIST will be returned.

The name may only be a single component; multi-component lookups are not supported.

PARAMETERS

d
The directory to search.
name
The name of the file.
excl
TRUE if an error should be returned if the file exists
mode
The file mode to use if creating a new file.
out_file
The oskit_file COM interface for the file.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group