RTEMS Logo

RTEMS 4.7.2 On-Line Library


Files and Directories Manager stat - Gets information about a file

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

4.4.21: stat - Gets information about a file

CALLING SEQUENCE:

#include <sys/types.h>
#include <sys/stat.h>

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

STATUS CODES:

EACCES
Search permission is denied for a directory in a file's path prefix.
EBADF
Invalid file descriptor.
ENAMETOOLONG
Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is in effect.
ENOENT
A file or directory does not exist.
ENOTDIR
A component of the specified pathname was not a directory when a directory was expected.

DESCRIPTION:

The path argument points to a pathname for a file. Read, write, or execute permission for the file is not required, but all directories listed in path must be searchable. The stat() function obtains information about the named file and writes it to the area pointed to by buf.

NOTES:

NONE


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2004 OAR Corporation