zhangzengfei
2020-03-31 0ce893695d32ab686f9e2309509e80c6feb0d380
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
#ifndef FACEID2_0_FILEUTIL_H
#define FACEID2_0_FILEUTIL_H
 
#include <stdio.h>
#include <memory>
#include <vector>
#include <iostream>
#include <fstream>
using namespace std;
 
class FileUtil {
public:
    static long  getFileSize(const char * fileName) {
        FILE * file = fopen(fileName, "r+");
        fseek(file, 0, SEEK_END);
        long size = ftell(file);
        fclose(file);
        return size;
    }
    static long int readFile(const char* fileName, shared_ptr<vector<unsigned char>> buffer, long  fileSize) {
        return 0;
    }
 
};
 
 
#endif //FACEID2_0_FILEUTIL_H