data DirEntry
One entry of a directory listing: name is relative to the listed directory (walk gives sub/dir/name).
Example:
use std.io { fs }
fn main() io {
let dir = fs.tempDir()!
for e in fs.list(dir)! {
print(e.name)
}
print("empty directory listed")
fs.removeAll(dir)!
}Вывод
empty directory listed
@derive(Eq)
pub(api) data DirEntryС версии. 1.0.0-beta
Поля
pub(api) name: str | Name relative to the listed directory. |
pub(api) kind: FileKind | What the entry is. |
Определено в: std/io/io.oxl:573