-
Notifications
You must be signed in to change notification settings - Fork 0
/
fileHandles.h
32 lines (26 loc) · 1.22 KB
/
fileHandles.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Created by paul on 8/31/22.
//
#ifndef UCIFS_FILEHANDLES_H
#define UCIFS_FILEHANDLES_H
typedef struct sMountPoint tMountPoint;
typedef struct sFileHandle tFileHandle;
int isDirectory( const char * path );
int getFileAttributes( tFileHandle * fh, struct stat * st );
int getDirAttributes( tMountPoint * mountPoint, struct stat * st );
tMountPoint * initRoot( uid_t uid, gid_t gid );
int populateRoot( tMountPoint * mountPoint );
int releaseRoot( tMountPoint * mountPoint );
tFileHandle * newFH( const char * path, int mode );
tFileHandle * findFH( const char * path );
tFileHandle * getFH( tFileHandle * fh, const char * path );
tFileHandle * nextFH( tFileHandle * fh );
const char * getFHpath( tFileHandle * fh );
struct stat * getFHstat( tFileHandle * fh );
ssize_t readFH( tFileHandle * fh, char *buffer, size_t size, off_t offset );
ssize_t writeFH( tFileHandle * fh, const char *buffer, size_t size, off_t offset );
int truncateFH( tFileHandle * fh, off_t offset );
int populateFH( tFileHandle * fh );
int parseFH( tFileHandle * fh );
void releaseFH( tFileHandle * fh );
#endif //UCIFS_FILEHANDLES_H