999 B
ramfs.h
Specific driver for RAMFS.
Warning: This is a filesystem specific driver, by this it should only be accessed by the VFS.
The ramfs (ram-filesystem) is not a filesystem in the common sense. All data that is stored in ramfs is stored in the virtual file systems cache. This means that all data in ramfs is temporary and erased after a reboot.
ramfs_file_delete(node)
- function (void)
Frees the files cache space. This won't delete the node in the vfs.
ramfs_file_write(node, size, buffer_in)
- function (void)
If this file has some cache space allocated, it will be freed. Then there will be some cache space (size bytes) allocated and size bytes from buffer_in copied into the cache.
This use of the vfs cache isn't a great solution and should be reworked.
ramfs_file_read(node, size, buffer_out)
- function (void)
Copies size bytes from the files' cache to buffer_out. This won't copy more bytes than the allocated cache space is big.