Skip to content
FutureBlitz

    Install

    Import std.io.temp

    std.io.temp

    std.io's temporary files and folders: each is new, in the OS's temporary folder, with a name no other has, and goes away, with what's in it, when it's closed, or when its last reference goes.

    std/io/temp.fb

    Types

    TempDir class

    Public Class TempDir

    A new, empty folder of the program's own, which Close removes with everything in it.

    std/io/temp.fb, line 17

    • Public ReadOnly Field Path: Path field #

      Where the folder is.

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

      Makes one named prefix and six letters and digits.

    • Public Method Close() Throws IOError method #

      Removes the folder and everything in it, which a second Close leaves alone. One that fails, as when a file in it is still open on Windows, can be tried again.

    TempFile class

    Public Class TempFile

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

    std/io/temp.fb, line 42

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