-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile.h
More file actions
28 lines (24 loc) · 820 Bytes
/
file.h
File metadata and controls
28 lines (24 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef FILE_H
#define FILE_H
#ifndef STORAGE_SERVER_H
#include "storage_server.h"
#endif
// FILE STRUCT FUNCTIONS
int checkFilePathExists(char* path);
int validateFilePath(char* filepath, char* operation_no);
int addFile(char* path, int check);
int removeFile(char* path);
void decreaseReaderCount(char* path);
void openWriteLock(char* path);
void cleanUpFileStruct();
// ACTUAL FILE FUNCTIONS
int checkFileType(char* path);
int fileExists(char *filename);
void createFile(char* path, char* response);
void deleteFile(char *filename, char* response);
void getFileMetaData(char* filepath, int clientSocketID);
void copyFile(char* ss_path, char* response);
void copyDirectory(char* ss_path, char* response);
void DownloadFile(int serverSocket, char* filename);
int UploadFile(int serverSocket, char* filename);
#endif