OxL Reference

method File.isFile

Whether path is a regular file (following links); false for a missing path.

Example:

oxl✓ checked in CI
use std.io { File, fs }

fn main() io {
  let dir = fs.tempDir()!
  print("{File.isFile(dir)}")
  fs.removeAll(dir)!
}
Output
false
pub(api) static fn isFile(path: str) -> bool  io

Since. 1.0.0-beta

Parameters

NameType
pathstr

Returns

bool

Effects

io

Defined in: std/io/io.oxl:518

See also