Module sys/dir
Directory operations.
Provides low-level directory manipulation wrappers around C runtime externs.
Async operations (mkdir, unlink, rename, symlink, link, getdents)
return IoFuture which resolves to:
- 0 on success (for mkdir, unlink, rename, symlink, link)
- Bytes read for getdents
- Negative value: -errno on failure
Stability
unstable — a raw, errno-oriented wrapper over the C directory calls, and
not the surface a caller wants: results come back as a bare i32 that is
either a count or -errno, and getdents hands back a byte buffer the
caller has to walk itself. std/fs is the typed face (Dir, read_dir,
create_dir_all, remove_dir_all), it returns Result(_, IoError), and
it is what should be imported.
This module freezes, if ever, as an implementation detail of std/fs; the
more likely end state is that it goes _-private once std/fs covers the
last direct caller.
Functions
Parameters
| Name | Type | Notes |
|---|---|---|
dirfd | i32 | |
path | *u8 | |
mode | i32 |
Returns: IoFuture
Parameters
| Name | Type | Notes |
|---|---|---|
dirfd | i32 | |
path | *u8 | |
flags | i32 |
Returns: IoFuture
Parameters
| Name | Type | Notes |
|---|---|---|
olddirfd | i32 | |
oldpath | *u8 | |
newdirfd | i32 | |
newpath | *u8 |
Returns: IoFuture
Parameters
| Name | Type | Notes |
|---|---|---|
target | *u8 | |
newdirfd | i32 | |
linkpath | *u8 |
Returns: IoFuture
Parameters
| Name | Type | Notes |
|---|---|---|
olddirfd | i32 | |
oldpath | *u8 | |
newdirfd | i32 | |
newpath | *u8 | |
flags | i32 |
Returns: IoFuture
Parameters
| Name | Type | Notes |
|---|---|---|
dirfd | i32 | |
path | *u8 | |
buf | *u8 | |
bufsize | usize |
Returns: i32
Parameters
| Name | Type | Notes |
|---|---|---|
fd | i32 | |
buf | *u8 | |
buf_size | u32 |
Returns: IoFuture
Returns: usize
Parameters
| Name | Type | Notes |
|---|---|---|
entry | *u8 |
Returns: u16
Parameters
| Name | Type | Notes |
|---|---|---|
entry | *u8 |
Returns: u8
Parameters
| Name | Type | Notes |
|---|---|---|
entry | *u8 |
Returns: *u8
Parameters
| Name | Type | Notes |
|---|---|---|
entry | *u8 |
Returns: u64