20 #ifndef _UNIX_FILESYSTEM_H 21 #define _UNIX_FILESYSTEM_H 23 #include "modules/system/vfs/Directory.h" 24 #include "modules/system/vfs/File.h" 25 #include "modules/system/vfs/Filesystem.h" 27 #include "pedigree/kernel/utilities/Buffer.h" 28 #include "pedigree/kernel/utilities/RingBuffer.h" 34 #define MAX_UNIX_DGRAM_BACKLOG 65536 35 #define MAX_UNIX_STREAM_QUEUE 65536 64 virtual void truncate(
File *pFile)
68 virtual void fileAttributeChanged(
File *pFile)
72 virtual void cacheDirectoryContents(
File *pFile)
81 virtual void extend(
File *pFile,
size_t size)
95 virtual bool remove(
File *parent,
File *file);
100 static String m_VolumeLabel;
102 virtual bool isBytewise()
const 131 UnixSocket *other =
nullptr, SocketType type = Datagram);
134 virtual uint64_t readBytewise(
135 uint64_t location, uint64_t size, uintptr_t buffer,
136 bool bCanBlock =
true);
137 virtual uint64_t writeBytewise(
138 uint64_t location, uint64_t size, uintptr_t buffer,
139 bool bCanBlock =
true);
142 recvfrom(uint64_t size, uintptr_t buffer,
bool bCanBlock,
String &from);
144 virtual int select(
bool bWriting =
false,
int timeout = 0);
158 bool bind(
UnixSocket *other,
bool block =
false);
164 void acknowledgeBind();
182 void removeWaiter(
Event *event);
185 SocketType getType()
const 191 SocketState getState()
const 197 bool markListening();
200 struct ucred getCredentials() const
206 struct ucred getPeerCredentials() const
208 return m_pOther->getCredentials();
244 UnixSocketStream m_Stream;
258 struct ucred m_Creds;
271 bool removeEntry(
File *pFile);
273 virtual void cacheDirectoryContents();
virtual bool createDirectory(File *parent, const String &filename, uint32_t mask)
virtual bool createFile(File *parent, const String &filename, uint32_t mask)
static Directory * fromFile(File *pF)
virtual bool isSocket() const
virtual bool initialise(Disk *pDisk)
virtual bool createSymlink(File *parent, const String &filename, const String &value)
virtual File * getRoot() const
virtual String getVolumeLabel() const
virtual bool isDirectory()
Utility class to provide a ring buffer.
virtual void cacheDirectoryContents()
virtual bool isBytewise() const