-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.h
More file actions
70 lines (61 loc) · 1.52 KB
/
function.h
File metadata and controls
70 lines (61 loc) · 1.52 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#pragma once
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <libgen.h>
#include <sys/vfs.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <mntent.h>
#include <unistd.h>
#include <dirent.h> // diropen(), readdir()
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
#include <errno.h>
#include <termios.h>
// #ifndef FUNCTION_H
// #define FUNCTION_H
// #endif
#define NUM_THREADS 3
/*
* 구조체 정의부
*/
typedef enum _boolean {
FALSE,
TRUE
} boolean;
struct f_size
{
long blocks;
long avail;
long percent;
};
typedef struct _mountinfo
{
FILE *fp; // 파일 스트림 포인터
char devname[80]; // 장치 이름
char mountdir[80]; // 마운트 디렉토리 이름
char fstype[12]; // 파일 시스템 타입
struct f_size size; // 파일 시스템의 총크기/사용율
} MOUNTP;
/*
* 함수 선언부
*/
char* getCurrentTime(char typeFlag);
boolean createFolder(char* folderName);
boolean deleteFolder(char* folderName); // only Dir delete
int delDirFile(const char* folder); // file/dir delete
int getRepoSize(char* targetPath);
unsigned long getFsSize(char* targetPath, char* osType);
MOUNTP *getDirSize();
int dfclose(MOUNTP *MP);
MOUNTP *dfget(MOUNTP *MP);
MOUNTP *dfopen();
int searchDir(char *targetPath);
int rmdirs(const char *path, int is_error_stop);
char* searchOldDir(char* targetPath);
char* getModiTime(char *targetPath);
char* itoa(int integer);
int getch(void);
void deleteProc(void* data);