OxL Справочник OxL
РусскийEnglish

method File.stat

Like metadata, following symbolic links.

Example:

oxl✓ проверяется в CI
use std.io { File, Metadata }

fn main() io {
  match File.stat("/definitely/missing") {
    Metadata _ => print("exists")
    IoError e => print("{e.kind == IoErrorKind.NotFound}")
  }
}
Вывод
true
pub(api) static fn stat(path: str) -> Metadata | IoError  io

С версии. 1.0.0-beta

Параметры

ИмяТип
pathstr

Возвращает

Metadata

Ошибки

  • IoError @error
  • `IoError` (`NotFound` when the path or the target of a link does not exist).

Эффекты

io

Определено в: std/io/io.oxl:478

См. также