diff --git a/interfaces/kits/js/BUILD.gn b/interfaces/kits/js/BUILD.gn index b8bbd116a5ddd294928ae80158fa06eb3cfb2023..d502cfa18eb7ffdb9cef37ec275f67cdfa58a3be 100644 --- a/interfaces/kits/js/BUILD.gn +++ b/interfaces/kits/js/BUILD.gn @@ -107,6 +107,7 @@ ohos_shared_library("fs") { relative_install_dir = "module/file" include_dirs = [ + "${src_path}/common", "${src_path}/common/file_helper", "${src_path}/mod_fs", "//third_party/libuv/include", diff --git a/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp b/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp index 7208be6c3d0170ab4fffdbf084c093504d073770..51744a99174b323e4b0d828559e6fe052424765e 100755 --- a/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/copy_file.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/interfaces/kits/js/src/mod_fs/properties/listfile.h b/interfaces/kits/js/src/mod_fs/properties/listfile.h index d649bb913b97d1b94b5358b3cb43f64ecc188746..f7d4028e3edf48661633ff195aae193423d06079 100755 --- a/interfaces/kits/js/src/mod_fs/properties/listfile.h +++ b/interfaces/kits/js/src/mod_fs/properties/listfile.h @@ -17,7 +17,7 @@ #define INTERFACES_KITS_JS_SRC_MOD_FS_PROPERTIES_LISTFILE_H #include "filemgmt_libn.h" -#include "../../common/file_filter.h" +#include "file_filter.h" #include diff --git a/interfaces/kits/js/src/mod_fs/properties/move.cpp b/interfaces/kits/js/src/mod_fs/properties/move.cpp index c7cce98e7304eb5f9d1318778348aef1dde6fde4..5592b6868064ab1be2251cf30b53c6640518fd3e 100644 --- a/interfaces/kits/js/src/mod_fs/properties/move.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/move.cpp @@ -18,7 +18,6 @@ #ifdef __MUSL__ #include #else -#include #include #endif @@ -47,7 +46,7 @@ static bool CheckDir(const string &path) static bool CheckDir(const string &path) { struct stat fileInformation; - if (EOK == stat(path.c_str(), &fileInformation)) { + if (stat(path.c_str(), &fileInformation) == 0) { if (fileInformation.st_mode & S_IFDIR) { return true; } diff --git a/interfaces/kits/js/src/mod_fs/properties/read_text.cpp b/interfaces/kits/js/src/mod_fs/properties/read_text.cpp index 61093e160bd254732bd4a64920b8b7fcf5063a84..60b71e81ea00005e3d22210b158c90dd53d4d124 100755 --- a/interfaces/kits/js/src/mod_fs/properties/read_text.cpp +++ b/interfaces/kits/js/src/mod_fs/properties/read_text.cpp @@ -15,7 +15,6 @@ #include "read_text.h" #include -#include #include #include #include diff --git a/utils/filemgmt_libn/include/n_error.h b/utils/filemgmt_libn/include/n_error.h index 49079ddcc7d27695658947160853f5a629f83aca..04cf76719c99d3b8f47179e8c5219238e82ad27b 100644 --- a/utils/filemgmt_libn/include/n_error.h +++ b/utils/filemgmt_libn/include/n_error.h @@ -27,6 +27,11 @@ namespace OHOS { namespace FileManagement { namespace LibN { +#ifdef IOS_PLATFORM +constexpr int EBADR = 53; +constexpr int EBADFD = 77; +constexpr int ERESTART = 85; +#endif constexpr int UNKROWN_ERR = -1; constexpr int ERRNO_NOERR = 0; constexpr int STORAGE_SERVICE_SYS_CAP_TAG = 13600000;