libSystem Reference Manual: File

## File File |

## Functions

File * | file_new ()
int | file_delete ()
FileMode | file_get_mode ()
ssize_t | file_read ()
ssize_t | file_write ()
int | file_seek ()
int | file_unlink ()

## Types and Values

typedef | FileMode
typedef | FileSeekMode
#define | FILE_MODE_READ
#define | FILE_MODE_WRITE
#define | FILE_MODE_APPEND
#define | FILE_MODE_CREATE
#define | FILE_MODE_EXCLUSIVE
#define | FILE_MODE_TRUNCATE
| File

## Description

## Functions

### file_new ()

    File *
    file_new (char const *path,
              FileMode mode);

#### Returns

### file_delete ()

    int
    file_delete (File *file);

#### Returns

### file_get_mode ()

    FileMode
    file_get_mode (File *file);

#### Returns

### file_read ()

    ssize_t
    file_read (File *file,
               void *buf,
               size_t size,
               ssize_t count);

#### Returns

### file_write ()

    ssize_t
    file_write (File *file,
                void *buf,
                size_t size,
                ssize_t count);

#### Returns

### file_seek ()

    int
    file_seek (File *file,
               FileSeekMode mode,
               off_t offset);

#### Returns

### file_unlink ()

    int
    file_unlink (File *file);

#### Returns

## Types and Values

### FileMode

    typedef unsigned int FileMode;

### FileSeekMode

    typedef unsigned int FileSeekMode;

### FILE_MODE_READ

    #define FILE_MODE_READ		0x01

### FILE_MODE_WRITE

    #define FILE_MODE_WRITE		0x02

### FILE_MODE_APPEND

    #define FILE_MODE_APPEND 0x10

### FILE_MODE_CREATE

    #define FILE_MODE_CREATE 0x20

### FILE_MODE_EXCLUSIVE

    #define FILE_MODE_EXCLUSIVE 0x40

### FILE_MODE_TRUNCATE

    #define FILE_MODE_TRUNCATE 0x80

### File

    typedef struct _File File;