| | 67 | /* Permissions and/or other meta data is stored in |
|---|
| | 68 | * the file's stream. These functions work like |
|---|
| | 69 | * db_get_file_data |
|---|
| | 70 | */ |
|---|
| | 71 | char *db_get_file_stream( int file_id ); // TODO |
|---|
| | 72 | char *db_get_file_stream( int file_id, int revision ); // TODO |
|---|
| | 73 | |
|---|
| | 74 | |
|---|
| | 75 | /* Sets the delete flag in the file |
|---|
| | 76 | */ |
|---|
| | 77 | int db_remove_file(int file_id); // TODO |
|---|
| | 78 | |
|---|
| | 79 | |
|---|
| | 80 | /* This creates a blank file for writing. If the file |
|---|
| | 81 | * allready exists, then it removes the delete flag and |
|---|
| | 82 | * revisions it. |
|---|
| | 83 | */ |
|---|
| | 84 | int db_create_file(char *file_name, char *file_path, stream data); // TODO |
|---|
| | 85 | |
|---|
| | 86 | |
|---|
| | 87 | /* Branches a file by creating a new file based on a |
|---|
| | 88 | * given revision and a file_id. This is used for |
|---|
| | 89 | * moving files to new directories, etc. If either |
|---|
| | 90 | * new_file_name OR new_file_path is NULL, |
|---|
| | 91 | * db_branch_file uses the name OR path of the old |
|---|
| | 92 | * file. YOU CANNOT PASS NULL FOR BOTH. |
|---|
| | 93 | * |
|---|
| | 94 | * db_branch_file returns the file_id of the new |
|---|
| | 95 | * file or NULL in the case of a failture. |
|---|
| | 96 | */ |
|---|
| | 97 | int db_branch_file(int file_id, int revision, char *new_file_name, char *new_file_path ); // TODO |
|---|
| | 98 | |
|---|
| | 99 | /* For revisioning an existing file, this function |
|---|
| | 100 | * modifies the data in an existing file given by |
|---|
| | 101 | * file_id |
|---|
| | 102 | */ |
|---|
| | 103 | int db_modify_file_data(int file_id, char *data); // TODO |
|---|
| | 104 | |
|---|
| | 105 | |
|---|
| | 106 | /* For changing the permissions on an existing file |
|---|
| | 107 | * modifies the stream in an existing file given by |
|---|
| | 108 | * file_id. |
|---|
| | 109 | */ |
|---|
| | 110 | int db_modify_file_stream(int file_id, stream data); // TODO |
|---|