Go to the documentation of this file.
18 #ifndef __LIB_LIBFS_FILESYSTEMCLIENT_H
19 #define __LIB_LIBFS_FILESYSTEMCLIENT_H
21 #include <FreeNOS/API/ProcessID.h>
116 Size & descriptor)
const;
175 const Size msecTimeout)
const;
FileSystem::Result createFile(const char *path, const FileSystem::FileType type, const FileSystem::FileModes mode) const
Create a new file.
static const Size MaximumFileSystemMounts
Maximum number of mounted filesystems.
FileType
All possible filetypes.
Represents a mounted filesystem.
FileSystem::Result statFile(const char *path, FileSystem::FileStat *st) const
Retrieve status of a file.
FileSystemClient provides a simple interface to a FileSystemServer.
FileSystem::Result waitFileSystem(const char *path) const
Blocking wait for a mounted filesystem.
Provides information about an inode.
FileSystem::Result mountFileSystem(const char *mountPath) const
Mount the current process as a file system on the rootfs.
u32 ProcessID
Process Identification Number.
FileSystem::Result deleteFile(const char *path) const
Remove a file from the file system.
FileSystemClient(const ProcessID pid=ANY)
Class constructor function.
FileSystem::Result request(const char *path, FileSystemMessage &msg) const
Send an IPC request to the target file system.
const ProcessID m_pid
ProcessID of the target file system or ANY to lookup in mounts table.
static String * m_currentDirectory
Current directory path is prefixed to relative path inputs.
const String * getCurrentDirectory() const
Get current directory String.
FileSystem::Result writeFile(const Size descriptor, const void *buf, Size *size) const
Write a file.
FileSystem::Result closeFile(const Size descriptor) const
Close a file.
FileSystem::Result openFile(const char *path, Size &descriptor) const
Open a file.
void setCurrentDirectory(const String &directory)
Set new current directory.
static FileSystemMount m_mounts[MaximumFileSystemMounts]
FileSystem mounts table.
unsigned int Size
Any sane size indicator cannot go negative.
FileSystemMount * getFileSystems(Size &numberOfMounts) const
Get file system mounts table.
FileSystem::Result readFile(const Size descriptor, void *buf, Size *size) const
Read a file.
ProcessID findMount(const char *path) const
Retrieve the ProcessID of the FileSystemMount for the given path.
u16 FileModes
Multiple FileMode values combined.
Contains file information.
Result
Result code for filesystem Actions.
FileSystem::Result waitFile(const char *filesystemPath, const FileSystem::WaitSet *waitSet, const Size count, const Size msecTimeout) const
Wait for one or more files to become readable/writable.