Struct openat::Dir [] [src]

pub struct Dir(_);

A safe wrapper around directory file descriptor

Construct it either with Dir::cwd() or Dir::open(path)

Methods

impl Dir
[src]

Creates a directory descriptor that resolves paths relative to current workding directory (AT_FDCWD)

Open a directory descriptor at specified path

List subdirectory of this dir

You can list directory itself if "." is specified as path.

Open subdirectory

Read link in this directory

Open file for reading in this directory

Create file for writing (and truncate) in this directory

Make a symlink in this directory

Note: the order of arguments differ from symlinkat

Create a subdirectory in this directory

Rename a file in this directory to another name (keeping same dir)

Remove a subdirectory in this directory

Note only empty directory may be removed

Remove a file in this directory

Get the path of this directory (if possible)

This uses symlinks in /proc/self, they sometimes may not be available so use with care.

Remove a file in this directory

Trait Implementations

impl AsRawFd for Dir
[src]

Extracts the raw file descriptor. Read more

impl Debug for Dir
[src]

Formats the value using the given formatter.