#include <oskit/fs/dir.h>oskit_error_t oskit_dir_reparent(oskit_dir_t *d, oskit_dir_t *parent, [out] oskit_dir_t **out_dir);
client OS filesystem library
This method creates a virtual directory out_dir which refers to the same underlying directory as d, but whose logical parent directory is parent. If parent is NULL, then the logical parent directory of out_dir will be itself.Lookups of the parent directory entry ('..') in the virtual directory will return a reference to the logical parent directory.
This method may be used to provide equivalent functionality to the Unix chroot operation.
- d
- The directory
- parent
- The logical parent directory
- out_dir
- The oskit_dir COM interface for the virtual directory
Returns 0 on success, or an error code specified in <oskit/error.h>, on error.