src/tools/fs.rs - read_dir: return nix::Result
This commit is contained in:
parent
a57360983b
commit
c698636a5d
@ -93,7 +93,7 @@ impl Iterator for ReadDir {
|
|||||||
|
|
||||||
/// Create an iterator over sub directory entries.
|
/// Create an iterator over sub directory entries.
|
||||||
/// This uses `openat` on `dirfd`, so `path` can be relative to that or an absolute path.
|
/// This uses `openat` on `dirfd`, so `path` can be relative to that or an absolute path.
|
||||||
pub fn read_subdir<P: ?Sized + nix::NixPath>(dirfd: RawFd, path: &P) -> Result<ReadDir, Error> {
|
pub fn read_subdir<P: ?Sized + nix::NixPath>(dirfd: RawFd, path: &P) -> nix::Result<ReadDir> {
|
||||||
use nix::fcntl::OFlag;
|
use nix::fcntl::OFlag;
|
||||||
use nix::sys::stat::Mode;
|
use nix::sys::stat::Mode;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user