59 static File open(
string file,
string mode);
180 void write(
string data);
269 static bool mkdir(
const char* path);
279 static bool rmdir(
const char* path);
289 static bool remove(
const char* path);
299 static bool exists(
const char* path);
Class for file system operations in Rishka applications.
Definition: fs.h:259
static bool rmdir(const char *path)
Remove a directory with the specified path.
Definition: librishka_fs.cpp:117
static bool exists(const char *path)
Check if a file or directory exists at the specified path.
Definition: librishka_fs.cpp:125
static bool remove(const char *path)
Remove a file with the specified path.
Definition: librishka_fs.cpp:121
static bool mkdir(const char *path)
Create a directory with the specified path.
Definition: librishka_fs.cpp:113
Class for handling file operations in Rishka applications.
Definition: fs.h:40
static File open(string file, string mode)
Open a file with the specified name and mode.
Definition: librishka_fs.cpp:25
bool is_dir()
Check if the object represents a directory.
Definition: librishka_fs.cpp:33
usize size()
Get the size of the file.
Definition: librishka_fs.cpp:49
bool is_file()
Check if the object represents a file.
Definition: librishka_fs.cpp:29
File(i32 _handle)
Definition: librishka_fs.cpp:21
string path()
Get the path of the file.
Definition: librishka_fs.cpp:69
usize position()
Get the current position within the file.
Definition: librishka_fs.cpp:53
i32 read()
Read a byte from the file.
Definition: librishka_fs.cpp:57
bool seek_dir(u64 position)
Set the current position within the directory.
Definition: librishka_fs.cpp:101
bool is_ok()
Checks if the file is in a valid state.
Definition: librishka_fs.cpp:81
u64 lastwrite()
Get the timestamp of the last write operation on the file.
Definition: librishka_fs.cpp:97
i32 peek()
Peek at the next byte in the file without consuming it.
Definition: librishka_fs.cpp:41
void rewind()
Rewind the directory pointer to the beginning of the current working directory.
Definition: librishka_fs.cpp:109
bool bufsize(usize size)
Set the buffer size for the file.
Definition: librishka_fs.cpp:93
void close()
Close the file.
Definition: librishka_fs.cpp:89
i32 available()
Get the number of bytes available for reading from the file.
Definition: librishka_fs.cpp:37
string next_name()
Get the name of the next file in the directory.
Definition: librishka_fs.cpp:105
bool seek(u32 pos)
Set the current position within the file.
Definition: librishka_fs.cpp:45
void write(u8 data)
Write a byte to the file.
Definition: librishka_fs.cpp:61
File next()
Get the next file in the directory.
Definition: librishka_fs.cpp:77
string name()
Get the name of the file.
Definition: librishka_fs.cpp:73
void flush()
Flush the file buffer.
Definition: librishka_fs.cpp:85
Header file for common data types used in Rishka applications.
signed int i32
Alias for the signed 32-bit integer type.
Definition: types.h:58
unsigned int u32
Alias for the unsigned 32-bit integer type.
Definition: types.h:82
unsigned char u8
Alias for the unsigned 8-bit integer type.
Definition: types.h:70
unsigned long int u64
Alias for the unsigned 64-bit integer type.
Definition: types.h:88
u32 usize
Alias for the unsigned integer type representing size.
Definition: types.h:94