2022-12-05 21:09:12 -06:00
|
|
|
#ifndef FSACTIONS_H
|
|
|
|
#define FSACTIONS_H
|
|
|
|
|
|
|
|
#include "fusestructs.h"
|
|
|
|
|
|
|
|
void AddFileToFS(FileSystem* fs, char* fname);
|
|
|
|
void ListFS(FileSystem* fs);
|
|
|
|
void _ListFS_(FileSystem* fs, ino_t inodeNumber, short unsigned numtabs);
|
|
|
|
void RemoveFileFromFS(FileSystem* fs, char* fname);
|
2022-12-06 23:36:35 -06:00
|
|
|
int _RemoveFileFromFS_(FileSystem* fs, ino_t inodeNumber, char* fname);
|
2022-12-05 21:09:12 -06:00
|
|
|
void ExtractFileFromFS(FileSystem* fs, char* fname);
|
|
|
|
|
|
|
|
ino_t GetFreeInodeNumber(Inode inodes[]);
|
|
|
|
ino_t GetFreeBlockNumber(int fbl[], unsigned short size);
|
2022-12-07 02:38:45 -06:00
|
|
|
void UpdateFreeBlockList(int* number, int position);
|
2022-12-05 21:09:12 -06:00
|
|
|
int FindEmptyBitPosition(int number);
|
|
|
|
int FindNextDirectory(char* fname);
|
2022-12-06 20:25:22 -06:00
|
|
|
int FindDirectory(Inode inode, char* directoryName);
|
2022-12-05 21:09:12 -06:00
|
|
|
void SetFileSystemDefaults(FileSystem* fs);
|
|
|
|
void SetupRootDirectory(FileSystem* fs);
|
2022-12-06 20:25:22 -06:00
|
|
|
void SetupDirectoryBlock(DirectBlock* newBlock, ino_t inode);
|
2022-12-05 21:09:12 -06:00
|
|
|
|
|
|
|
#endif
|