stat(3)

DESCRIPTION

Obtains metadata for path and writes the Astia libc struct stat. Type, mode, size, block count, timestamps, and the VFS device/inode/link values are supplied.

SYNOPSIS

#include <sys/stat.h>

int stat(const char *path, struct stat *result);

RETURN VALUE

  • Returns zero, or -1 and sets errno.

ERRORS

  • -EFAULT
    • Path or result is null or inaccessible.
  • -EINVAL
    • Path resolution fails.
  • -ENOENT
    • The path does not name an object.

NOTES

Unsupported metadata fields remain zero rather than being inferred.