4#ifndef RUDIMENTS_FILE_H
5#define RUDIMENTS_FILE_H
7#include <rudiments/private/fileincludes.h>
52 virtual bool open(
const char *name, int32_t flags);
85 virtual bool open(
const char *name,
97 virtual bool create(
const char *name, mode_t perms);
692 virtual bool reserve(off64_t start,
size_t len);
835 const char *newgroup);
893 const char *newpath);
899 const char *newpath);
913 const char *newpath);
917 static bool remove(
const char *filename);
926 static bool truncate(
const char *filename, off64_t size);
973 static bool exists(
const char *filename);
1014 const char *newuser,
1015 const char *newgroup);
1020 uid_t uid, gid_t gid);
1031 time_t lastaccesstime);
1037 time_t lastmodtime);
1044 const char *filename,
1045 time_t lastaccesstime,
1046 time_t lastmodtime);
1052 const char *filename);
1110 const char *pattern,
1125 const char *
const *patterns,
1156 #include <rudiments/private/file.h>
static char * getDirName(const char *filename)
static bool isWriteable(const char *filename)
static char * getEightDotThree(const char *filename)
static bool createSymbolicLink(const char *oldpath, const char *newpath)
virtual time_t getLastAccessTime()
static bool remove(const char *filename)
virtual bool open(const char *name, int32_t flags)
virtual int32_t isBlockDevice()
static bool isAccessible(const char *filename, int32_t mode)
static char * getBaseName(const char *filename, const char *ext)
virtual bool unlockFromEnd(off64_t start, off64_t len)
virtual bool tryLockFromCurrent(int16_t type, off64_t len)
virtual bool tryLockRemainderFromEnd(int16_t type)
virtual bool tryLockRemainderFromCurrent(int16_t type, off64_t start)
virtual bool getCurrentProperties()
static char * resolveSymbolicLink(const char *filename)
virtual bool tryLockFromEnd(int16_t type, off64_t start, off64_t len)
virtual bool adviseOnlyOnce(off64_t start, size_t len)
static bool createFile(const char *name, mode_t perms)
virtual int32_t isSymbolicLink()
virtual blksize_t getBlockSize()
static ssize_t getContents(const char *name, byte_t *buffer, size_t buffersize)
virtual off64_t getSize()
virtual ssize_t getContents(byte_t **buffer, size_t *buffersize)
static char * getExtension(const char *filename)
virtual bool setPermissions(mode_t perms)
virtual bool lockFromEnd(int16_t type, off64_t start, off64_t len)
virtual int32_t isDirectory()
static bool setLastAccessAndModificationTimes(const char *filename)
virtual int32_t isCharacterDevice()
virtual bool tryLockFile(int16_t type)
static key_t generateKey(const char *filename, int32_t id)
virtual bool unlockRemainder(off64_t start)
virtual void setGetCurrentPropertiesOnOpen(bool set)
virtual bool reserve(off64_t start, size_t len)
virtual int32_t isRegularFile()
virtual bool checkLockRemainderFromCurrent(int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual int64_t getMaxLinks()
virtual blkcnt_t getBlockCount()
static char * getBaseName(const char *filename)
virtual bool unlockRemainderFromEnd(off64_t start)
virtual bool adviseNormalAccess(off64_t start, size_t len)
virtual bool adviseWillNeed(off64_t start, size_t len)
static bool setLastAccessTime(const char *filename, time_t lastaccesstime)
virtual bool checkLockRemainderFromEnd(int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual uid_t getOwnerUserId()
virtual bool lockRemainder(int16_t type, off64_t start)
virtual bool lockRemainderFromEnd(int16_t type)
virtual bool lockRemainderFromEnd(int16_t type, off64_t start)
static bool createHardLink(const char *oldpath, const char *newpath)
static char * getContents(const char *name)
virtual bool lockRemainderFromCurrent(int16_t type)
virtual bool tryLockRemainder(int16_t type, off64_t start)
static int32_t createTemporaryFile(char *templatefilename)
static bool getCanChangeOwner(const char *filename)
static bool getMatchingFileNames(const char *pattern, linkedlist< char * > *matches)
virtual bool lockFromCurrent(int16_t type, off64_t start, off64_t len)
static bool getMatchingFileNames(linkedlist< const char * > *patterns, linkedlist< char * > *matches)
virtual bool unlockRegion(off64_t start, off64_t len)
static bool setLastModificationTime(const char *filename, time_t lastmodtime)
virtual bool checkLockRemainder(int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual bool unlockFile()
virtual bool create(const char *name, mode_t perms)
static int64_t getMaxLinks(const char *filename)
virtual bool changeOwner(uid_t uid, gid_t gid)
static bool truncate(const char *filename)
virtual time_t getLastChangeTime()
virtual bool getCanChangeOwner()
virtual int32_t isSocket()
static bool rename(const char *oldpath, const char *newpath)
static bool getLastChangeTime(const char *filename, time_t *ctime)
virtual mode_t getPermissions()
virtual bool checkLockRegion(int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
static bool changeOwner(const char *filename, uid_t uid, gid_t gid)
virtual bool checkLockFromEnd(int16_t type, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
static bool setPermissions(const char *filename, mode_t perms)
virtual bool checkLockFile(int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual nlink_t getNumberOfHardLinks()
virtual bool checkLockFromCurrent(int16_t type, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual bool checkLockRemainderFromEnd(int16_t type, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual bool lockFile(int16_t type)
virtual dev_t getDevice()
virtual ssize_t getContents(byte_t *buffer, size_t buffersize)
virtual bool adviseSequentialAccess(off64_t start, size_t len)
virtual bool truncate(off64_t size)
virtual bool adviseWontNeed(off64_t start, size_t len)
virtual bool tryLockFromCurrent(int16_t type, off64_t start, off64_t len)
virtual bool checkLockFromCurrent(int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual bool changeOwner(const char *newuser, const char *newgroup)
virtual bool unlockFromEnd(off64_t len)
virtual bool tryLockFromEnd(int16_t type, off64_t len)
virtual void * getInternalFileStatisticsStructure()
virtual bool lockRegion(int16_t type, off64_t start, off64_t len)
virtual bool lockRemainderFromCurrent(int16_t type, off64_t start)
virtual bool open(const char *name, int32_t flags, mode_t perms)
static bool changeOwner(const char *filename, const char *newuser, const char *newgroup)
virtual bool tryLockRemainderFromCurrent(int16_t type)
virtual bool lockFromEnd(int16_t type, off64_t len)
virtual bool adviseRandomAccess(off64_t start, size_t len)
virtual bool unlockFromCurrent(off64_t start, off64_t len)
virtual bool unlockFromCurrent(off64_t len)
virtual bool unlockRemainderFromCurrent()
virtual bool unlockRemainderFromCurrent(off64_t start)
virtual char * getContents()
static bool exists(const char *filename)
static bool isReadable(const char *filename)
virtual time_t getLastModificationTime()
virtual bool lockFromCurrent(int16_t type, off64_t len)
virtual ssize_t getContents(const char *name, byte_t **buffer, size_t *buffersize)
static bool createFifo(const char *filename, mode_t perms)
static bool isExecutable(const char *filename)
static int32_t createTemporaryFile(char *templatefilename, mode_t perms)
static bool getMatchingFileNames(linkedlist< char * > *patterns, linkedlist< char * > *matches)
virtual bool checkLockRemainderFromCurrent(int16_t type, off64_t start, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
virtual gid_t getOwnerGroupId()
static bool truncate(const char *filename, off64_t size)
virtual bool unlockRemainderFromEnd()
static bool setLastAccessAndModificationTimes(const char *filename, time_t lastaccesstime, time_t lastmodtime)
static bool getMatchingFileNames(const char *const *patterns, linkedlist< char * > *matches)
virtual bool tryLockRegion(int16_t type, off64_t start, off64_t len)
virtual uint64_t getInode()
virtual dev_t getDeviceType()
virtual bool tryLockRemainderFromEnd(int16_t type, off64_t start)
virtual bool checkLockFromEnd(int16_t type, off64_t start, off64_t len, int16_t *conftype, int16_t *confwhence, off64_t *confstart, off64_t *conflen)
Definition filedescriptor.h:13
Definition linkedlist.h:47