Skip to content
FutureBlitz

    Install

    Import std.io.temp

    TempFile

    std.io.temp

    class

    Public Class TempFile

    A new, empty file of the program's own, which Close deletes.

    Examples

    Local file = Try TempFile()
    Try File.WriteText(file.Path, "scratch")
    Expect(File.Exists(file.Path))
    Try file.Close()
    Expect(!File.Exists(file.Path))

    std/io/temp.fb, line 65

    • Public ReadOnly Field Path: Path field #

      Where the file is.

    • Public New(prefix: String = "fb-") Throws IOError constructor #

      Makes one named prefix and six letters and digits.

    • Public Method Close() Throws IOError method #

      Deletes the file, which a second Close leaves alone. One that fails can be tried again.

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