Tizen RT Libs&Environment  v1.0 D5

Provides APIs for File Control. More...

Collaboration diagram for FCNTL:

Files

file  fcntl.h
 File control APIs.
 

Data Structures

struct  flock
 

Macros

#define O_RDONLY   (1 << 0) /* Open for read access (only) */
 
#define O_RDOK   O_RDONLY /* Read access is permitted (non-standard) */
 
#define O_WRONLY   (1 << 1) /* Open for write access (only) */
 
#define O_WROK   O_WRONLY /* Write access is permitted (non-standard) */
 
#define O_RDWR   (O_RDOK|O_WROK) /* Open for both read & write access */
 
#define O_CREAT   (1 << 2) /* Create file/sem/mq object */
 
#define O_EXCL   (1 << 3) /* Name must not exist when opened */
 
#define O_APPEND   (1 << 4) /* Keep contents, append to end */
 
#define O_TRUNC   (1 << 5) /* Delete contents */
 
#define O_NONBLOCK   (1 << 6) /* Don't wait for data */
 
#define O_NDELAY   O_NONBLOCK /* Synonym for O_NONBLOCK */
 
#define O_SYNC   (1 << 7) /* Synchronize output on write */
 
#define O_DSYNC   O_SYNC /* Equivalent to OSYNC in TinyAra */
 
#define O_BINARY   (1 << 8) /* Open the file in binary (untranslated) mode. */
 
#define O_RSYNC   0 /* Synchronize input on read */
 
#define O_ACCMODE   O_RDWR /* Mask for access mode */
 
#define O_NOCTTY   0 /* Required by POSIX */
 
#define O_TEXT   0 /* Open the file in text (translated) mode. */
 
#define _O_MAXBIT   8
 
#define FNDELAY   O_NONBLOCK /* Don't wait for data */
 
#define FNONBLOCK   O_NONBLOCK /* Don't wait for data */
 
#define FAPPEND   O_APPEND /* Keep contents, append to end */
 
#define FSYNC   O_SYNC /* Synchronize output on write */
 
#define FASYNC   0 /* No counterpart in TinyAra */
 
#define FFCNTL   (FNONBLOCK | FNDELAY | FAPPEND | FSYNC | FASYNC)
 
#define F_DUPFD   0 /* Duplicate a file descriptor */
 
#define F_GETFD   1 /* Read the file descriptor flags */
 
#define F_GETFL   2 /* Read the file status flags */
 
#define F_GETLEASE   3 /* Indicates what type of lease is held on fd (linux) */
 
#define F_GETLK   4 /* Check if we could place a lock */
 
#define F_GETOWN   5 /* Get the pid receiving SIGIO and SIGURG signals for fd */
 
#define F_GETSIG   6 /* Get the signal sent */
 
#define F_NOTIFY   7 /* Provide notification when directory referred to by fd changes (linux) */
 
#define F_SETFD   8 /* Set the file descriptor flags to value */
 
#define F_SETFL   9 /* Set the file status flags to the value */
 
#define F_SETLEASE   10 /* Set or remove file lease (linux) */
 
#define F_SETLK   11 /* Acquire or release a lock on range of bytes */
 
#define F_SETLKW   12 /* Like F_SETLK, but wait for lock to become available */
 
#define F_SETOWN   13 /* Set pid that will receive SIGIO and SIGURG signals for fd */
 
#define F_SETSIG   14 /* Set the signal to be sent */
 
#define F_RDLCK   0 /* Take out a read lease */
 
#define F_WRLCK   1 /* Take out a write lease */
 
#define F_UNLCK   2 /* Remove a lease */
 
#define FD_CLOEXEC   1
 
#define DN_ACCESS   0 /* A file was accessed */
 
#define DN_MODIFY   1 /* A file was modified */
 
#define DN_CREATE   2 /* A file was created */
 
#define DN_DELETE   3 /* A file was unlinked */
 
#define DN_RENAME   4 /* A file was renamed */
 
#define DN_ATTRIB   5 /* Attributes of a file were changed */
 
#define creat(path, mode)   open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)
 
#define EXTERN   extern
 

Functions

int open (const char *path, int oflag,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 
int fcntl (int fd, int cmd,...)
 POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/) More...
 

Detailed Description

Provides APIs for File Control.

Macro Definition Documentation

#define _O_MAXBIT   8

Definition at line 107 of file fcntl.h.

#define creat (   path,
  mode 
)    open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)

Definition at line 163 of file fcntl.h.

#define DN_ACCESS   0 /* A file was accessed */

Definition at line 151 of file fcntl.h.

#define DN_ATTRIB   5 /* Attributes of a file were changed */

Definition at line 156 of file fcntl.h.

#define DN_CREATE   2 /* A file was created */

Definition at line 153 of file fcntl.h.

#define DN_DELETE   3 /* A file was unlinked */

Definition at line 154 of file fcntl.h.

#define DN_MODIFY   1 /* A file was modified */

Definition at line 152 of file fcntl.h.

#define DN_RENAME   4 /* A file was renamed */

Definition at line 155 of file fcntl.h.

#define EXTERN   extern

Definition at line 188 of file fcntl.h.

#define F_DUPFD   0 /* Duplicate a file descriptor */

Definition at line 123 of file fcntl.h.

#define F_GETFD   1 /* Read the file descriptor flags */

Definition at line 124 of file fcntl.h.

#define F_GETFL   2 /* Read the file status flags */

Definition at line 125 of file fcntl.h.

#define F_GETLEASE   3 /* Indicates what type of lease is held on fd (linux) */

Definition at line 126 of file fcntl.h.

#define F_GETLK   4 /* Check if we could place a lock */

Definition at line 127 of file fcntl.h.

#define F_GETOWN   5 /* Get the pid receiving SIGIO and SIGURG signals for fd */

Definition at line 128 of file fcntl.h.

#define F_GETSIG   6 /* Get the signal sent */

Definition at line 129 of file fcntl.h.

#define F_NOTIFY   7 /* Provide notification when directory referred to by fd changes (linux) */

Definition at line 130 of file fcntl.h.

#define F_RDLCK   0 /* Take out a read lease */

Definition at line 141 of file fcntl.h.

#define F_SETFD   8 /* Set the file descriptor flags to value */

Definition at line 131 of file fcntl.h.

#define F_SETFL   9 /* Set the file status flags to the value */

Definition at line 132 of file fcntl.h.

#define F_SETLEASE   10 /* Set or remove file lease (linux) */

Definition at line 133 of file fcntl.h.

#define F_SETLK   11 /* Acquire or release a lock on range of bytes */

Definition at line 134 of file fcntl.h.

#define F_SETLKW   12 /* Like F_SETLK, but wait for lock to become available */

Definition at line 135 of file fcntl.h.

#define F_SETOWN   13 /* Set pid that will receive SIGIO and SIGURG signals for fd */

Definition at line 136 of file fcntl.h.

#define F_SETSIG   14 /* Set the signal to be sent */

Definition at line 137 of file fcntl.h.

#define F_UNLCK   2 /* Remove a lease */

Definition at line 143 of file fcntl.h.

#define F_WRLCK   1 /* Take out a write lease */

Definition at line 142 of file fcntl.h.

#define FAPPEND   O_APPEND /* Keep contents, append to end */

Definition at line 113 of file fcntl.h.

#define FASYNC   0 /* No counterpart in TinyAra */

Definition at line 115 of file fcntl.h.

#define FD_CLOEXEC   1

Definition at line 147 of file fcntl.h.

#define FFCNTL   (FNONBLOCK | FNDELAY | FAPPEND | FSYNC | FASYNC)

Definition at line 119 of file fcntl.h.

#define FNDELAY   O_NONBLOCK /* Don't wait for data */

Definition at line 111 of file fcntl.h.

#define FNONBLOCK   O_NONBLOCK /* Don't wait for data */

Definition at line 112 of file fcntl.h.

#define FSYNC   O_SYNC /* Synchronize output on write */

Definition at line 114 of file fcntl.h.

#define O_ACCMODE   O_RDWR /* Mask for access mode */

Definition at line 99 of file fcntl.h.

#define O_APPEND   (1 << 4) /* Keep contents, append to end */

Definition at line 88 of file fcntl.h.

#define O_BINARY   (1 << 8) /* Open the file in binary (untranslated) mode. */

Definition at line 94 of file fcntl.h.

#define O_CREAT   (1 << 2) /* Create file/sem/mq object */

Definition at line 86 of file fcntl.h.

#define O_DSYNC   O_SYNC /* Equivalent to OSYNC in TinyAra */

Definition at line 93 of file fcntl.h.

#define O_EXCL   (1 << 3) /* Name must not exist when opened */

Definition at line 87 of file fcntl.h.

#define O_NDELAY   O_NONBLOCK /* Synonym for O_NONBLOCK */

Definition at line 91 of file fcntl.h.

#define O_NOCTTY   0 /* Required by POSIX */

Definition at line 100 of file fcntl.h.

#define O_NONBLOCK   (1 << 6) /* Don't wait for data */

Definition at line 90 of file fcntl.h.

#define O_RDOK   O_RDONLY /* Read access is permitted (non-standard) */

Definition at line 82 of file fcntl.h.

#define O_RDONLY   (1 << 0) /* Open for read access (only) */

Definition at line 81 of file fcntl.h.

#define O_RDWR   (O_RDOK|O_WROK) /* Open for both read & write access */

Definition at line 85 of file fcntl.h.

#define O_RSYNC   0 /* Synchronize input on read */

Definition at line 98 of file fcntl.h.

#define O_SYNC   (1 << 7) /* Synchronize output on write */

Definition at line 92 of file fcntl.h.

#define O_TEXT   0 /* Open the file in text (translated) mode. */

Definition at line 101 of file fcntl.h.

#define O_TRUNC   (1 << 5) /* Delete contents */

Definition at line 89 of file fcntl.h.

#define O_WROK   O_WRONLY /* Write access is permitted (non-standard) */

Definition at line 84 of file fcntl.h.

#define O_WRONLY   (1 << 1) /* Open for write access (only) */

Definition at line 83 of file fcntl.h.

Function Documentation

int fcntl ( int  fd,
int  cmd,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0
int open ( const char *  path,
int  oflag,
  ... 
)

POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

[SYSTEM CALL API]

Since
Tizen RT v1.0