The UFS feature API is summarized in the following table. It is identical to the API exported by the NFS_CLIENT feature. However, some system calls in this API will return with error codes since the underlying file system layout does not support all these operations. For general information on the API provided by this feature, see the POSIX standard (IEEE Std 1003.1b-1993). Some of the calls listed are also included in other features.
Command |
Description |
---|---|
access |
Check access permissions |
chdir, fchdir |
Change current directory |
chflags |
Modify file flags (BSD command) |
chmod, fchmod |
Change access mode |
chown, fchown |
Change owner |
chroot |
Change root directory |
close |
Close a file descriptor |
dup, dup2 |
Duplicate an open file descriptor |
fcntl |
File control |
flock |
Apply or remove an advisory lock on an open file |
fpathconf |
Get configurable pathname variables |
fsync |
Synchronize a file's in-core statistics with those on disk |
getdents |
Read directory entries |
getdirentries |
Get directory entries in a file system independent format |
getfsstat |
Get list of all mounted file systems |
ioctl |
Device control |
link |
Make a hard file link |
lseek |
Move read/write file pointer |
mkdir |
Make a directory file |
mkfifo |
Make FIFOs |
mknod |
Create a special file |
mount, umount |
Mount or unmount a file system |
open |
Open for reading or writing |
read, readv |
Read from file |
readlink |
Read a value of a symbolic link |
rename |
Change the name of a file |
revoke |
Invalidate all open file descriptors (BSD command) |
rmdir |
Remove a directory file |
stat, fstat, lstat |
Get file status |
statfs, fstatfs |
Get file system statistics |
symlink |
Make a symbolic link to a file |
sync |
Synchronize disk block in-core status with that on disk |
truncate, ftruncate |
Truncate a file |
umask |
Set file creation mode mask |
unlink |
Remove a directory entry |
utimes |
Set file access and modification times |
write, writev |
Write to a file |
The following library calls do not support multithreaded applications:
Function |
Description |
---|---|
opendir() |
Open a directory |
closedir() |
Close a directory |
readdir() |
Read directory entry |
rewinddir() |
Reset directory stream |
scandir() |
Scan a directory for matching entries |
seekdir() |
Set the position of the next readdir() call in the directory stream |
telldir() |
Return current location in directory stream |