Skip to content
FutureBlitz

    Install

    Import std.io.dir

    DirEntry

    std.io.dir

    struct

    Public Struct DirEntry

    Something in a folder: where it is, where it is from the folder that was listed, which for Entries is its name, and what it is.

    Examples

    Local folder = Try TempDir()
    Try File.WriteText(folder.Path / "a.txt", "")
    Local entry = (Try Dir.Entries(folder.Path))[0]
    Expect(entry.Name() == "a.txt" && entry.IsFile() && !entry.IsDirectory())
    Try folder.Close()

    std/io/dir.fb, line 42

    • Public ReadOnly Field Path: Path field #

      Where it is.

    • Public ReadOnly Field Relative: Path field #

      Where it is from the folder that was listed, which for Entries is its name.

    • Public ReadOnly Field Kind: FileKind field #

      Whether it's a file, a folder, or a link.

    • Public Method Name(): String method #

      Its own name, the last in its path.

    • Public Method IsFile(): Bool method #

      Whether it's a file.

    • Public Method IsDirectory(): Bool method #

      Whether it's a folder.

    Report an issue with this page or with FutureBlitz on GitHub.