std.os.posix Package
Function Description
The os.posix package is used to adapt to POSIX APIs.
This package provides unified control capabilities for multiple platforms, including Linux, macOS, Windows, and HarmonyOS.
API List
Functions
Name | Description | Supported on |
---|---|---|
open(String, Int32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, Windows, macOS, and HarmonyOS |
open(String, Int32, UInt32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, Windows, macOS, and HarmonyOS |
access(String, Int32) | Checks whether a file has certain permission. If yes, 0 is returned; otherwise, -1 is returned. | Linux, Windows, macOS, and HarmonyOS |
chdir(String) | Changes the current working directory of the calling process by specifying a path. | Linux, Windows, macOS, and HarmonyOS |
chmod(String, UInt32) | Modifies the file access permission. | Linux, Windows, macOS, and HarmonyOS |
chown(String, UInt32, UInt32) | Modifies the file owner and the group to which the file owner belongs. | Linux, macOS, and HarmonyOS |
close(Int32) | Closes a file. close causes data to be written back to the disk and resources occupied by the file to be released. | Linux, Windows, macOS, and HarmonyOS |
creat(String, UInt32) | Creates a file and returns a file descriptor, or returns -1 when the operation fails. | Linux, Windows, macOS, and HarmonyOS |
dup(Int32) | Copies and returns the file descriptor specified by the original fd parameter. | Linux, Windows, macOS, and HarmonyOS |
dup2(Int32, Int32) | Copies the file descriptor specified by oldfd and returns it to the newfd parameter. | Linux, Windows, macOS, and HarmonyOS |
faccessat(Int32, String, Int32, Int32) | Checks whether the file specified by fd has certain permission. If yes, 0 is returned; otherwise, -1 is returned. | Linux, macOS, and HarmonyOS |
fchdir(Int32) | Changes the current working directory of the calling process by specifying the descriptor of a file path. | Linux, macOS, and HarmonyOS |
fchmod(Int32, UInt32) | Modifies the file access permission corresponding to the file descriptor. | Linux, Windows, macOS, and HarmonyOS |
fchmodat(Int32, String, UInt32, Int32) | Modifies the file access permission corresponding to the file descriptor. | Linux, Windows, macOS, and HarmonyOS |
fchown(Int32, UInt32, UInt32) | Modifies the file owner corresponding to fd and the group to which the file owner belongs. | Linux, macOS, and HarmonyOS |
fchownat(Int32, String, UInt32, UInt32, Int32) | Modifies the file owner corresponding to the file descriptor and the group to which the file owner belongs. | Linux, macOS, and HarmonyOS |
getcwd() | Obtains the absolute path of the working directory of the current process. | Linux, Windows, macOS, and HarmonyOS |
getgid() | Obtains the user group ID . | Linux, macOS, and HarmonyOS |
getgroups(Int32, CPointer<UInt32>) | Obtains the code of the group to which the current user belongs. | Linux, macOS, and HarmonyOS |
gethostname() | Obtains the host name, which is usually the name of a host on the TCP/IP network. | Linux, macOS, and HarmonyOS |
getlogin() | Obtains the current login name. | Linux, macOS, and HarmonyOS |
getos() | Obtains the Linux system information from the file in /proc/version . | Linux |
getpgid(Int32) | Obtains PGID of the process specified by pid . If pid is 0, ID of the calling process is returned. | Linux, macOS, and HarmonyOS |
getpgrp() | Obtains ID of the parent process of the calling process. | Linux, macOS, and HarmonyOS |
getpid() | Obtains ID(PID) of the calling process. | Linux, Windows, macOS, and HarmonyOS |
getppid() | Obtains ID of the parent process of the calling process. | Linux, macOS, and HarmonyOS |
getuid() | Obtains the real user ID of the calling process. | Linux, macOS, and HarmonyOS |
isBlk(String) | Checks whether the input object is a block device and returns a Boolean value. | Linux, Windows, macOS, and HarmonyOS |
isChr(String) | Checks whether the input object is a character device and returns a Boolean value. | Linux, Windows, macOS, and HarmonyOS |
isDir(String) | Checks whether the input object is a folder and returns a Boolean value. | Linux, Windows, macOS, and HarmonyOS |
isFIFO(String) | Checks whether the input object is a FIFO file and returns a Boolean value. | Linux, macOS, and HarmonyOS |
isLnk(String) | Checks whether the input object is a soft link and returns a Boolean value. | Linux, macOS, and HarmonyOS |
isReg(String) | Checks whether the input object is a regular file and returns a Boolean value. | Linux, Windows, macOS, and HarmonyOS |
isSock(String) | Checks whether the input object is a socket file and returns a Boolean value. | Linux, macOS, and HarmonyOS |
isType(String, UInt32) | Checks whether a file is in the specified mode. | Linux, macOS, and HarmonyOS |
isatty(Int32) | Tests whether the file descriptor references the terminal. If the test is successful, true is returned; otherwise, false is returned. | Linux, Windows, macOS, and HarmonyOS |
kill(Int32, Int32) | Sends any signal to any process group or process. | Linux, macOS, and HarmonyOS |
killpg(Int32, Int32) | Sends sig to the process group pgrp . If pgrp is 0 , killpg() sends the signal to the process group to which the calling process belongs. | Linux, macOS, and HarmonyOS |
lchown(String, UInt32, UInt32) | Modifies the file link owner and the group to which the owner belongs. | Linux and macOS |
link(String, String) | Creates a link for an existing file. A file can have multiple directory entries pointing to i-node . | Linux, macOS, and HarmonyOS |
linkat(Int32, String, Int32, String, Int32) | Creates a file link relative to the directory file descriptor. | Linux, macOS, and HarmonyOS |
lseek(Int32, Int64, Int32) | Increases the read or write location accordingly in file reading or writing. | Linux, Windows, macOS, and HarmonyOS |
nice(Int32) | Changes the priority of the current thread. | Linux, macOS, and HarmonyOS |
open64(String, Int32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux and HarmonyOS |
open64(String, Int32, UInt32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux and HarmonyOS |
openat(Int32, String, Int32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, macOS, and HarmonyOS |
openat(Int32, String, Int32, UInt32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, macOS, and HarmonyOS |
openat64(Int32, String, Int32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, macOS, and HarmonyOS |
openat64(Int32, String, Int32, UInt32) | Opens a file and returns a new file descriptor, or returns -1 when the operation fails. | Linux, macOS, and HarmonyOS |
pread(Int32, CPointer<UInt8>, UIntNative, Int32) | Transfers nbyte of the file specified by fd to the memory specified by buffer . | Linux, macOS, and HarmonyOS |
pwrite(Int32, CPointer<UInt8>, UIntNative, Int32) | Writes nbyte in the memory specified by buffer to the file specified by fd , starting from the specified offset location. | Linux, macOS, and HarmonyOS |
read(Int32, CPointer<UInt8>, UIntNative) | Transfers nbyte of the file specified by fd to the memory specified by buffer . | Linux, Windows, macOS, and HarmonyOS |
remove(String) | Deletes a file or directory. | Linux, Windows, macOS, and HarmonyOS |
rename(String, String) | Renames a file. If necessary, the directory where the file is located is moved. | Linux, Windows, macOS, and HarmonyOS |
renameat(Int32, String, Int32, String) | Renames a file. If necessary, the directory where the file is located is moved. | Linux, macOS, and HarmonyOS |
setgid(UInt32) | Sets the valid group ID of the calling process. Permissions are required to run this function. | Linux and macOS |
sethostname(String) | Sets the host name. Only the super user can call this function. | Linux and macOS |
setpgid(Int32, Int32) | Sets the group ID specified by pid to the group ID specified by pgrp . | Linux, macOS, and HarmonyOS |
setpgrp() | Sets ID of the group to which the current process belongs to ID of the process of the current process. This function is equivalent to calling setpgid(0, 0). | Linux, macOS, and HarmonyOS |
setuid(UInt32) | Sets the valid user ID of the calling process. Permissions are required to run this function. | Linux and macOS |
symlink(String, String) | Creates a link named symPath to the file specified by path . | Linux, macOS, and HarmonyOS |
symlinkat(String, Int32, String) | Creates a link named symPath to the file specified by path and fd . | Linux, macOS, and HarmonyOS |
ttyname(Int32) | Returns the terminal name. | Linux, Windows, macOS, and HarmonyOS |
umask(UInt32) | Sets the permission mask. | Linux, Windows, macOS, and HarmonyOS |
unlink(String) | Deletes a file from the file system. | Linux, macOS, and HarmonyOS |
unlinkat(Int32, String, Int32) | Deletes a file from the file system. | Linux, macOS, and HarmonyOS |
write(Int32, CPointer<UInt8>, UIntNative) | Writes nbyte in the memory specified by buffer to the file specified by fd . | Linux, Windows, macOS, and HarmonyOS |
Constants
Name | Description | Supported on |
---|---|---|
AT_EMPTY_PATH | Specifies the file descriptor returned when no file or directory is specified in the file system. This constant is applicable to the open , open64 , openat , and openat64 functions, and belongs to the function parameter oflag . | Linux, Windows, and HarmonyOS |
AT_REMOVEDIR | Performs an operation equivalent to rmdir(2) on pathname if the AT_REMOVEDIR flag is specified. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_CLOEXEC | Mandatory in some multi-thread programs. This is because when one thread opens the file descriptor and another thread executes fork(2) followed by execve(2) , using a separate fcntl(2) F_SETFD operation to set the FD_CLOEXEC flag is not enough to prevent contention. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_DIRECTORY | If the file specified by pathname is not a directory, the file fails to be opened. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_CREAT | If the file to be opened does not exist, automatically creates the file. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_DSYNC | Waits for the physical I/O to complete upon each write operation. However, if the write operation does not affect reading of the data just written, it is unnecessary to wait for the file attribute to update. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_EXCL | If O_CREAT is also set, checks whether the file exists; if the file does not exist, creates the file. Otherwise, a file opening error is displayed. In addition, if both O_CREAT and O_EXCL are set and the file to be opened is a symbolic link, the file fails to be opened. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_NOCTTY | If the file to be opened is a terminal device, the file is not the control terminal of the process. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_NOFOLLOW | If the file specified by pathname is a single symbolic link, the file fails to be opened. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_NONBLOCK | Opens a file in non-blocking mode. That is, the I/O operation does not cause the calling process to wait. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_SYNC | Opens a file synchronously. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, macOS, and HarmonyOS |
O_RDONLY | Opens a file in read-only mode. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_RDWR | Opens a file in read/write mode. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_WRONLY | Opens a file in write-only mode. This constant is applicable to the open , open64 , openat , and openat64 functions, and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_APPEND | Moves data from the end of a file in file reading or writing, that is, appends the data to be written to the end of the file. This constant is applicable to the open , open64 , openat , and openat64 functions, and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
O_RSYNC | This flag affects only the read operation and needs to be used together with O_SYNC or O_DSYNC . If necessary, this flag blocks the read call until the data being read (and possibly metadata) is flushed to the disk. This constant is applicable to the open , open64 , openat , and openat64 functions and belongs to the function parameter oflag . | Linux and HarmonyOS |
O_TRUNC | If the file exists and is writable, clears the file length to 0, making the data previously stored in the file disappear. This constant is applicable to the open , open64 , openat , and openat64 functions, and belongs to the function parameter oflag . | Linux, Windows, macOS, and HarmonyOS |
R_OK | Tests the read permission on a file. This constant is applicable to the access and faccessat functions and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
W_OK | Tests the write permission on a file. This constant is applicable to the access and faccessat functions and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
X_OK | Tests the execute permission on a file. This constant is applicable to the access and faccessat functions and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
F_OK | Tests whether a file exists. This constant is applicable to the access and faccessat functions and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
SEEK_SET | Specifies the new read/write location. This constant is applicable to the lseek function and belongs to the function parameter whence . | Linux, Windows, macOS, and HarmonyOS |
SEEK_CUR | Adds an offset to the current read or write location. This constant is applicable to the lseek function and belongs to the function parameter whence . | Linux, Windows, macOS, and HarmonyOS |
SEEK_END | Sets the read/write location to the end of the file and adds an offset. This constant is applicable to the lseek function and belongs to the function parameter whence . | Linux, Windows, macOS, and HarmonyOS |
SIGABRT | Specifies an abnormal abortion. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGBUS | Specifies a hardware fault. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGFPE | Specifies an arithmetic error. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGKILL | Specifies a kill signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGCONT | Continues a stopped process. The default action is continue or ignore. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGHUP | Specifies that the connection is broken. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGINT | Specifies a terminal interrupt character. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGQUIT | Specifies a terminal quit character. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGILL | Specifies that the hardware instruction is invalid. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGTRAP | Specifies a hardware fault. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGIOT | Specifies a hardware fault. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGIO | Specifies an asynchronous IO . The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGPIPE | Writes data to the pipe of an unread process. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGALRM | Specifies that the timer expires. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGPWR | Specifies power failure or restart. The system call is invalid. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, and HarmonyOS |
SIGSEGV | Specifies invalid memory reference. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGSTOP | Specifies a stop signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGTERM | Specifies a terminate signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGSTKFLT | Specifies a coprocessor stack fault. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, and HarmonyOS |
SIGCHLD | Specifies that the subprocess status is changed. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGTSTP | Specifies a terminal stop signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGTTIN | Reads the control tty on the background. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGTTOU | Writes the control tty on the background. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGURG | Specifies an emergency (socket). The default action is ignore. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGUSR1 | Specifies a user-defined signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGUSR2 | Specifies a user-defined signal. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGVTALRM | Specifies a virtual time alarm. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGPROF | Specifies digest timeout. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGWINCH | Changes the terminal window size. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGXCPU | Specifies that CPU usage exceeds the upper limit. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
SIGXFSZ | Specifies that the file length exceeds the upper limit. The default action is terminate. This constant is applicable to the kill and killpg functions and belongs to the function parameter sig . | Linux, Windows, macOS, and HarmonyOS |
S_IRUSR | Specifies that the file owner has read permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IWUSR | Specifies that the file owner has write permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IRGRP | Specifies that the file user group has read permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IWGRP | Specifies that the file user group has write permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IFREG | Specifies that the file type is regular. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFBLK | Specifies that the file type is block device. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFDIR | Specifies that the file type is directory. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFCHR | Specifies that the file type is character device. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFIFO | Specifies that the file type is FIFO . This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFLNK | Specifies that the file type is soft link. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IFSOCK | Specifies that the file type is socket. This constant is applicable to the isType function and belongs to the function parameter mode . | Linux, Windows, macOS, and HarmonyOS |
S_IROTH | Specifies that other users have read permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IRWXG | Specifies that the file user group has read, write, and execute permissions on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IRWXU | Specifies that the file owner has read, write, and execute permissions on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IWOTH | Specifies that other users have write permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IXOTH | Specifies that other users have execute permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IRWXO | Specifies that other users have read, write, and execute permissions on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IXGRP | Specifies that the file user group has execute permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |
S_IXUSR | Specifies that the file owner has execute permission on the file. This constant is applicable to the open , open64 , openat , openat64 , chmod(mode) , fchmod(mode) , fchmodat(mode) , and creat functions, and belongs to the function parameter flag . | Linux, Windows, macOS, and HarmonyOS |