Skip to content
FutureBlitz

    Install

    Import std.io.file

    Metadata

    std.io.file

    struct

    Public Struct Metadata

    What's at a path, as File.Metadata found it: when it was last changed and read, and when it was made, which is Null where the OS or the disk doesn't say. IsReadOnly is whether its owner may not write it.

    Examples

    Local file = Try TempFile()
    Try File.WriteText(file.Path, "four")
    Local info = Try File.Metadata(file.Path)
    Expect(info.IsFile() && info.Size == 4 && !info.IsReadOnly)
    Try file.Close()

    std/io/file.fb, line 87

    • Public ReadOnly Field Kind: FileKind field #

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

    • Public ReadOnly Field Size: Int64 field #

      How many bytes it holds.

    • Public ReadOnly Field Modified: Timestamp field #

      When it was last changed.

    • Public ReadOnly Field Accessed: Timestamp field #

      When it was last read.

    • Public ReadOnly Field Created: Timestamp? field #

      When it was made, or Null where the OS or the disk doesn't say.

    • Public ReadOnly Field IsReadOnly: Bool field #

      Whether its owner may not write it.

    • 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.