• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef GRAPHIC_LITE_FILE_H
17 #define GRAPHIC_LITE_FILE_H
18 
19 #ifdef _WIN32
20 #include <sys/types.h>
21 #include <sys/stat.h>
22 #include <fcntl.h>
23 #include <io.h>
24 #ifdef _MSC_VER
25 #define F_OK 0
26 #endif
27 #else
28 #include "stdint.h"
29 #include "fcntl.h"
30 #include "unistd.h"
31 #include "sys/types.h"
32 #include "sys/mount.h"
33 #include "sys/stat.h"
34 #ifdef __APPLE__
35 #include "sys/param.h"
36 #else
37 #include "sys/statfs.h"
38 #endif
39 #include "dirent.h"
40 #include "stdio.h"
41 #include "errno.h"
42 #endif
43 
44 #define DEFAULT_FILE_PERMISSION 0660 // default file permission when creat file
45 #endif // GRAPHIC_LITE_FILE_H
46