Returns file information.
Standard C library (libc.a)
#include <sys/finfo.h>
int finfo(Path1, cmd, buffer, length) const char *Path1; int cmd; void *buffer; int length;
int ffinfo (fd, cmd, buffer, length) int fd; int cmd; void *buffer; int length;
The finfo and ffinfo subroutines return specific file information for the specified file.
Path1 | Path name of a file system object to query. |
fd | File descriptor for an open file to query. |
cmd | Specifies the type of file information to be returned. |
buffer | User supplied buffer which contains the file information upon successful return. /usr/include/sys/finfo.h describes the buffer. |
length | Length of the query buffer. |
F_PATHCONF | When the F_PATHCONF command is specified, a file's
implementation information is returned.
Note: The operating system provides another subroutine that retrieves file implementation characteristics, pathconf (pathconf or fpathconf Subroutine) command. While the finfo and ffinfo subroutines can be used to retrieve file information, it is preferred that programs use the pathconf interface. |
F_DIOCAP | When the F_DIOCAP command is specified, the file's direct 1/0 capability information is returned. The buffer supplied by the application is of type struct diocapbuf *. |
Upon successful completion, the finfo and ffinfo subroutines return a value of 0 and the user supplied buffer is correctly filled in with the file information requested. If the finfo or ffinfo subroutines were unsuccessful, a value of -1 is returned and the global errno variable is set to indicate the error.
EACCES | Search permission is denied for a component of the path prefix. |
EINVAL | If the length specified for the user buffer is greater than
MAX_FINFO_BUF.
If the command argument is not supported. If F_DIOCAP command is specified and the file object does not support Direct I/O. |
ENAMETOOLONG | The length of the Path parameter string exceeds the PATH_MAX value. |
ENOENT | The named file does not exist or the Path parameter points to an empty string. |
ENOTDIR | A component of the path prefix is not a directory. |
EBADF | File descriptor provided is not valid. |
These subroutines are part of Base Operating System (BOS) Runtime.
The pathconf (pathconf or fpathconf Subroutine) subroutine.
Subroutines, Example Programs, and Libraries in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.