#include "lib.h"
#include "list.h"
#include "uuid.h"
Go to the source code of this file.
◆ INODE_TABLE
| #define INODE_TABLE "data/inode.bin" |
◆ DefList()
◆ INode_deserialize()
◆ INode_get_db()
| ListINode INode_get_db |
( |
void | | ) |
|
Get the INode table from the database.
- Returns
- a List of INode's
◆ INode_set_db()
| void INode_set_db |
( |
ListINode | inodes | ) |
|
Write the database with the List of INode's.
- Parameters
-
| inodes | the List of INode's that you want to overwrite the database with |
◆ insert_into_inode()
| void insert_into_inode |
( |
SafeStr | fname, |
|
|
size_t | size ) |
INSERT into the INode table.
- Parameters
-
| fname | the name of the file |
| size | the size of the file in Byte's |
◆ ListINode_deserialize()
| ListINode ListINode_deserialize |
( |
Buffer | buf | ) |
|
Deserialize a Buffer into a List of INode's.
Caller must free memory in Block.cid.
- Parameters
-
| buffer | The Buffer you want to deserialize |
- Returns
- The List of INode's that the Buffer represents
◆ ListINode_print()
| void ListINode_print |
( |
ListINode | list | ) |
|
Prints a List of INode's.
- Parameters
-
| list | the List of INode's that you want to print |
◆ ListINode_serialize()
| Buffer ListINode_serialize |
( |
ListINode | list | ) |
|
Serialize a List of INode's into a Buffer.
Caller must free memory in Buffer.buf.
- Parameters
-
| list | the List of INode's that you want to serialize |
- Returns
- the Buffer that the ListINode represents
◆ print_inode()
| void print_inode |
( |
INode | inode | ) |
|
Print an INode's data as a tuple.
- Parameters
-
| inode | the INode to be printed |
◆ select_from_inode()
| ListINode select_from_inode |
( |
UUID * | fid, |
|
|
SafeStr * | fname, |
|
|
size_t * | size ) |
SELECT from the INode table.
- Parameters
-
| fid | the INode's UUID or NULL |
| fname | the INode's file's name or NULL @praam size the size of the file or NULL |
- Returns
- a ListINode of the possible matches