sofs19  0.1
FUSE based file system
syscalls.h
Go to the documentation of this file.
1 
15 #ifndef __SOFS19_SYSCALLS__
16 #define __SOFS19_SYSCALLS__
17 
18 #include <unistd.h>
19 #include <fcntl.h>
20 #include <inttypes.h>
21 #include <sys/types.h>
22 #include <sys/statvfs.h>
23 #include <sys/stat.h>
24 #include <time.h>
25 #include <utime.h>
26 #include <libgen.h>
27 
28 namespace sofs19
29 {
30 
37  /* ******************************************************************* */
38 
45  /* ******************************************************************* */
46 
73  int soMknod(const char *path, mode_t mode);
74 
75  /* ******************************************************************* */
76 
101  int soLink(const char *path, const char *newPath);
102 
103  /* ******************************************************************* */
104 
131  int soUnlink(const char *path);
132 
133  /* ******************************************************************* */
134 
164  int soMkdir(const char *path, mode_t mode);
165 
166  /* ******************************************************************* */
167 
192  int soRmdir(const char *path);
193 
194  /* ******************************************************************* */
195 
218  int soRead(const char *path, void *buff, uint32_t count, int32_t pos);
219 
220  /* ******************************************************************* */
221 
247  int soWrite(const char *path, void *buff, uint32_t count, int32_t pos);
248 
249  /* ******************************************************************* */
250 
265  int soRename(const char *path, const char *newPath);
266 
267  /* ******************************************************************* */
268 
283  int soTruncate(const char *path, off_t length);
284 
285  /* ******************************************************************* */
286 
309  int soReaddir(const char *path, void *buff, int32_t pos);
310 
311  /* ******************************************************************* */
312 
330  int soSymlink(const char *effPath, const char *path);
331 
332  /* ******************************************************************* */
333 
349  int soReadlink(const char *path, char *buff, size_t size);
350 
351  /* ******************************************************************* */
352 
355  /* ******************************************************************* */
356 
362  /* ******************************************************************* */
363 
377  int soOpenFileSystem(const char *devname);
378 
379  /* ******************************************************************* */
380 
391  int soCloseFileSystem(void);
392 
393  /* ******************************************************************* */
394 
412  int soStatFS(const char *path, struct statvfs *st);
413 
414  /* ******************************************************************* */
415 
433  int soStat(const char *path, struct stat *st);
434 
435  /* ******************************************************************* */
436 
456  int soAccess(const char *path, int opRequested);
457 
458  /* ******************************************************************* */
459 
482  int soChmod(const char *path, mode_t mode);
483 
484  /* ******************************************************************* */
485 
507  int soChown(const char *path, uid_t owner, gid_t group);
508 
509  /* ******************************************************************* */
510 
526  int soUtime(const char *path, const struct utimbuf *times);
527 
528  /* ******************************************************************* */
529 
549  int soUtimens(const char *path, const struct timespec tv[2]);
550 
551  /* ******************************************************************* */
552 
571  int soOpen(const char *path, int flags);
572 
573  /* ******************************************************************* */
574 
588  int soClose(const char *path);
589 
590  /* ******************************************************************* */
591 
608  int soFsync(const char *path);
609 
610  /* ******************************************************************* */
611 
628  int soOpendir(const char *path);
629 
630  /* ******************************************************************* */
631 
645  int soClosedir(const char *path);
646 
647  /* ******************************************************************* */
648 
650  /* ******************************************************************* */
651 
652  /* ******************************************************************* */
653 
655  /* ******************************************************************* */
656 
657 };
658 
659 #endif /* __SOFS19_SYSCALLS__ */
sofs19::soUtimens
int soUtimens(const char *path, const struct timespec tv[2])
Change the last access and modification times of a file with nanosecond resolution.
sofs19::soReaddir
int soReaddir(const char *path, void *buff, int32_t pos)
Read a directory entry from a directory.
sofs19::soRename
int soRename(const char *path, const char *newPath)
Change the name or the location of a file in the directory hierarchy of the file system.
sofs19::soStat
int soStat(const char *path, struct stat *st)
Get file status.
sofs19::soChown
int soChown(const char *path, uid_t owner, gid_t group)
Change the ownership of a file.
sofs19::soOpen
int soOpen(const char *path, int flags)
Open a regular file.
sofs19::soChmod
int soChmod(const char *path, mode_t mode)
Change permissions of a file.
sofs19::soUtime
int soUtime(const char *path, const struct utimbuf *times)
Change the last access and modification times of a file.
sofs19::soMkdir
int soMkdir(const char *path, mode_t mode)
Create a directory.
sofs19::soRmdir
int soRmdir(const char *path)
Remove an existing directory.
sofs19::soOpendir
int soOpendir(const char *path)
Open a directory for reading.
sofs19::soClosedir
int soClosedir(const char *path)
Close a directory.
sofs19::soStatFS
int soStatFS(const char *path, struct statvfs *st)
Get file system statistics.
sofs19::soReadlink
int soReadlink(const char *path, char *buff, size_t size)
Read the value of a symbolic link.
sofs19::soUnlink
int soUnlink(const char *path)
Delete a link to a file from a directory and possibly the file it refers to from the file system.
sofs19::soLink
int soLink(const char *path, const char *newPath)
Make a new link to a file.
sofs19::soRead
int soRead(const char *path, void *buff, uint32_t count, int32_t pos)
Read data from an open regular file.
sofs19::soMknod
int soMknod(const char *path, mode_t mode)
Create a regular file with size 0.
sofs19::soAccess
int soAccess(const char *path, int opRequested)
Check real user's permissions for a file.
sofs19::soFsync
int soFsync(const char *path)
Synchronize a file's in-core state with storage device.
sofs19::soSymlink
int soSymlink(const char *effPath, const char *path)
Creates a symbolic link which contains the given path.
sofs19::soTruncate
int soTruncate(const char *path, off_t length)
Truncate a regular file to a specified length.
sofs19::soClose
int soClose(const char *path)
Close a regular file.
sofs19::soCloseFileSystem
int soCloseFileSystem(void)
Close the sofs19 file system.
sofs19::soOpenFileSystem
int soOpenFileSystem(const char *devname)
Open the sofs19 file system.
sofs19::soWrite
int soWrite(const char *path, void *buff, uint32_t count, int32_t pos)
Write data into an open regular file.