/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/class_dir/ |
H A D | dir_n_exporter.cpp | 43 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in GetDirEntity() 49 UniError(EIO).ThrowErr(env, "Cannot get entity of Dir"); in GetDirEntity() 59 UniError(EBADF).ThrowErr(env, "Dir has been closed yet"); in CloseSync() 72 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Close() 78 UniError(EIO).ThrowErr(env, "Cannot get entity of Dir"); in Close() 83 UniError(EBADF).ThrowErr(env, "Dir has been closed yet"); in Close() 87 auto cbExec = [dirEntity](napi_env env) -> UniError { in Close() 92 return UniError(errno); in Close() 94 return UniError(ERRNO_NOERR); in Close() 97 auto cbCompl = [](napi_env env, UniError er in Close() [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/common/ |
H A D | uni_error.cpp | 42 UniError::UniError() {} in UniError() function in OHOS::DistributedFS::UniError 44 UniError::UniError(ELegacy eLegacy) : errno_(eLegacy), codingSystem_(ERR_CODE_SYSTEM_LEGACY) {} in UniError() function in OHOS::DistributedFS::UniError 46 UniError::UniError(int ePosix) : errno_(ePosix), codingSystem_(ERR_CODE_SYSTEM_POSIX) {} in UniError() function in OHOS::DistributedFS::UniError 48 UniError::UniError(int ePosix, bool throwCode) : errno_(ePosix), codingSystem_(ERR_CODE_SYSTEM_POSIX), in UniError() function in OHOS::DistributedFS::UniError 51 UniError::operator bool() const in operator bool() 56 int UniError [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/properties/ |
H A D | fstat.cpp | 39 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 45 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Sync() 51 UniError(errno).ThrowErr(env); in Sync() 57 UniError(EINVAL).ThrowErr(env, "Cannot instantiate class"); in Sync() 63 UniError(EINVAL).ThrowErr(env, "Cannot get the entity of objStat"); in Sync() 79 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 85 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Async() 90 auto cbExec = [fd = fd, arg = arg](napi_env env) -> UniError { in Async() 92 return UniError(errno); in Async() 94 return UniError(ERRNO_NOER in Async() [all...] |
H A D | stat_v9.cpp | 51 UniError(EINVAL, true).ThrowErr(env); in ParseJsFile() 56 UniError(EINVAL, true).ThrowErr(env); in ParseJsFile() 64 UniError(EINVAL, true).ThrowErr(env); in Sync() 75 UniError(errno, true).ThrowErr(env); in Sync() 80 UniError(errno, true).ThrowErr(env); in Sync() 87 UniError(EIO, true).ThrowErr(env); in Sync() 92 UniError(EIO, true).ThrowErr(env); in Sync() 107 UniError(EINVAL, true).ThrowErr(env); in Async() 116 auto cbExec = [arg, fileInfo = make_shared<FileInfo>(move(fileInfo))](napi_env env) -> UniError { in Async() 119 return UniError(errn in Async() [all...] |
H A D | prop_n_exporter.cpp | 68 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in AccessSync() 74 UniError(EINVAL).ThrowErr(env, "Invalid path"); in AccessSync() 82 UniError(EINVAL).ThrowErr(env, "Invalid mode"); in AccessSync() 88 UniError(errno).ThrowErr(env); in AccessSync() 99 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Access() 105 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Access() 113 UniError(EINVAL).ThrowErr(env, "Invalid mode"); in Access() 118 auto cbExec = [path = string(path.get()), mode](napi_env env) -> UniError { in Access() 121 return UniError(errno); in Access() 123 return UniError(ERRNO_NOER in Access() [all...] |
H A D | fsync.cpp | 35 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 41 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Sync() 46 UniError(errno).ThrowErr(env); in Sync() 57 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 63 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Async() 67 auto cbExec = [fd = fd](napi_env env) -> UniError { in Async() 69 return UniError(errno); in Async() 71 return UniError(ERRNO_NOERR); in Async() 75 auto cbComplete = [](napi_env env, UniError err) -> NVal { in Async()
|
H A D | fdatasync.cpp | 35 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 41 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Sync() 47 UniError(errno).ThrowErr(env); in Sync() 59 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 65 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Async() 69 auto cbExec = [fd = fd](napi_env env) -> UniError { in Async() 72 return UniError(errno); in Async() 74 return UniError(ERRNO_NOERR); in Async() 78 auto cbComplCallback = [](napi_env env, UniError err) -> NVal { in Async()
|
H A D | rmdir.cpp | 33 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 39 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 44 UniError(errno).ThrowErr(env); in Sync() 55 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 61 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Async() 65 auto cbExec = [path = string(path.get())](napi_env env) -> UniError { in Async() 68 return UniError(errno); in Async() 70 return UniError(ERRNO_NOERR); in Async() 74 auto cbCompl = [](napi_env env, UniError err) -> NVal { in Async()
|
H A D | close.cpp | 34 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 40 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Sync() 45 UniError(errno).ThrowErr(env); in Sync() 56 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 62 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Async() 66 auto cbExec = [fd = fd](napi_env env) -> UniError { in Async() 69 return UniError(errno); in Async() 71 return UniError(ERRNO_NOERR); in Async() 75 auto cbComplete = [](napi_env env, UniError err) -> NVal { in Async()
|
H A D | ftruncate.cpp | 35 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 41 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Sync() 50 UniError(EINVAL).ThrowErr(env, "Invalid len"); in Sync() 56 UniError(errno).ThrowErr(env); in Sync() 67 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 73 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in Async() 82 UniError(EINVAL).ThrowErr(env, "Invalid len"); in Async() 87 auto cbExec = [fd = fd, len = len](napi_env env) -> UniError { in Async() 90 return UniError(errno); in Async() 92 return UniError(ERRNO_NOER in Async() [all...] |
H A D | stat.cpp | 39 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 45 UniError(EINVAL).ThrowErr(env, "The first argument requires type string"); in Sync() 52 UniError(errno).ThrowErr(env); in Sync() 78 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 84 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Async() 90 auto cbExec = [arg = arg, path = path](napi_env env) -> UniError { in Async() 92 return UniError(errno); in Async() 94 return UniError(ERRNO_NOERR); in Async() 98 auto cbCompl = [arg = arg](napi_env env, UniError err) -> NVal { in Async() 105 return { env, UniError(EI in Async() [all...] |
H A D | truncate.cpp | 31 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 37 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 46 UniError(EINVAL).ThrowErr(env, "Invalid len"); in Sync() 51 UniError(errno).ThrowErr(env); in Sync() 62 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 68 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Async() 77 UniError(EINVAL).ThrowErr(env, "Invalid len"); in Async() 82 auto cbExec = [path = string(path.get()), len](napi_env env) -> UniError { in Async() 85 return UniError(errno); in Async() 87 return UniError(ERRNO_NOER in Async() [all...] |
H A D | create_stream.cpp | 40 UniError(EIO).ThrowErr(env, "INNER BUG. Cannot instantiate stream"); in InstantiateStream() 46 UniError(EIO).ThrowErr(env, "Cannot instantiate stream because of void entity"); in InstantiateStream() 58 UniError(EINVAL).ThrowErr(env, "Invalid path"); in GetCreateStreamArgs() 64 UniError(EINVAL).ThrowErr(env, "Invalid mode"); in GetCreateStreamArgs() 75 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 86 UniError(errno).ThrowErr(env); in Sync() 101 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 111 auto cbExec = [arg, argPath = move(argPath), argMode = move(argMode)](napi_env env) -> UniError { in Async() 114 return UniError(errno); in Async() 116 return UniError(ERRNO_NOER in Async() [all...] |
H A D | fdopen_stream.cpp | 38 UniError(EIO).ThrowErr(env, "INNER BUG. Cannot instantiate stream"); in InstantiateStream() 44 UniError(EIO).ThrowErr(env, "Cannot instantiate stream because of void entity"); in InstantiateStream() 56 UniError(EINVAL).ThrowErr(env, "Arg fd is required to be type integer"); in GetFdopenStreamArgs() 62 UniError(EINVAL).ThrowErr(env, "Arg mode is required to be type string"); in GetFdopenStreamArgs() 73 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 84 UniError(errno).ThrowErr(env); in Sync() 99 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 109 auto cbExec = [arg = arg, fd = fd, mode = mode](napi_env env) -> UniError { in Async() 112 return UniError(errno); in Async() 114 return UniError(ERRNO_NOER in Async() [all...] |
H A D | rename.cpp | 35 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 41 UniError(EINVAL).ThrowErr(env, "Invalid src"); in Sync() 47 UniError(EINVAL).ThrowErr(env, "Invalid dest"); in Sync() 52 UniError(errno).ThrowErr(env); in Sync() 63 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 69 UniError(EINVAL).ThrowErr(env, "Invalid src"); in Async() 75 UniError(EINVAL).ThrowErr(env, "Invalid dest"); in Async() 79 auto cbExec = [opath = string(src.get()), npath = string(dest.get())](napi_env env) -> UniError { in Async() 82 return UniError(errno); in Async() 84 return UniError(ERRNO_NOER in Async() [all...] |
H A D | lstat.cpp | 39 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 45 UniError(EINVAL).ThrowErr(env, "The first argument requires type string"); in Sync() 52 UniError(errno).ThrowErr(env); in Sync() 78 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 84 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Async() 90 auto cbExec = [arg, path](napi_env env) -> UniError { in Async() 92 return UniError(errno); in Async() 94 return UniError(ERRNO_NOERR); in Async() 98 auto cbCompl = [arg](napi_env env, UniError err) -> NVal { in Async() 104 return { env, UniError(EI in Async() [all...] |
H A D | rmdirent.cpp | 40 static UniError rmdirent(napi_env env, string path) in rmdirent() 43 return UniError(ERRNO_NOERR); in rmdirent() 47 return UniError(errno); in rmdirent() 60 return UniError(errno); in rmdirent() 71 return UniError(errno); in rmdirent() 78 return UniError(errno); in rmdirent() 80 return UniError(ERRNO_NOERR); in rmdirent() 88 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 94 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 110 UniError(EINVA in Async() [all...] |
H A D | open_dir.cpp | 44 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 50 UniError(errno).ThrowErr(env); in Sync() 56 UniError(EINVAL).ThrowErr(env, "Cannot instantiate class DirSync"); in Sync() 62 UniError(EINVAL).ThrowErr(env, "Cannot get the entity of objDir"); in Sync() 81 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 87 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Async() 93 auto cbExec = [arg, path](napi_env env) -> UniError { in Async() 97 return UniError(errno); in Async() 100 return UniError(ERRNO_NOERR); in Async() 103 auto cbCompl = [arg](napi_env env, UniError er in Async() [all...] |
H A D | truncate_v9.cpp | 44 UniError(EINVAL, true).ThrowErr(env); in ParseJsFile() 49 UniError(EINVAL, true).ThrowErr(env); in ParseJsFile() 58 UniError(EINVAL, true).ThrowErr(env); in Sync() 69 UniError(EINVAL, true).ThrowErr(env); in Sync() 75 UniError(errno, true).ThrowErr(env); in Sync() 80 UniError(errno, true).ThrowErr(env); in Sync() 91 UniError(EINVAL, true).ThrowErr(env); in Async() 102 UniError(EINVAL, true).ThrowErr(env); in Async() 106 auto cbExec = [fileInfo = make_shared<FileInfo>(move(fileInfo)), truncateLen](napi_env env) -> UniError { in Async() 109 return UniError(errn in Async() [all...] |
H A D | open.cpp | 37 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 45 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 53 UniError(EINVAL).ThrowErr(env, "Invalid flags"); in Sync() 69 UniError(EINVAL).ThrowErr(env, "called with O_CREAT/O_TMPFILE but no mode"); in Sync() 75 UniError(EINVAL).ThrowErr(env, "Invalid mode"); in Sync() 82 UniError(errno).ThrowErr(env, "Filename too long"); in Sync() 85 UniError(errno).ThrowErr(env); in Sync() 92 static UniError DoOpenExec(const std::string& path, const unsigned int flags, const int32_t mode, in DoOpenExec() 101 return UniError(errno); in DoOpenExec() 103 return UniError(ERRNO_NOER in DoOpenExec() [all...] |
H A D | copy_file.cpp | 46 static UniError CopyFileCore(FileInfo &srcFile, FileInfo &destFile) in CopyFileCore() 51 return UniError(errno); in CopyFileCore() 58 return UniError(errno); in CopyFileCore() 64 return UniError(errno); in CopyFileCore() 73 return UniError(errno); in CopyFileCore() 79 return UniError(errno); in CopyFileCore() 86 return UniError(ERRNO_NOERR); in CopyFileCore() 121 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 128 UniError(EINVAL).ThrowErr(env, "The first/second argument requires filepath/fd"); in Sync() 134 UniError(EINVA in Sync() [all...] |
H A D | read_text.cpp | 73 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 79 UniError(EINVAL).ThrowErr(env, "Invalid path"); in Sync() 85 UniError(EINVAL).ThrowErr(env, "Invalid option"); in Sync() 93 UniError(errno).ThrowErr(env); in Sync() 98 UniError(EINVAL).ThrowErr(env, "Invalid position"); in Sync() 105 UniError(EINVAL).ThrowErr(env, "file is too large"); in Sync() 110 UniError(errno).ThrowErr(env, "dfs mem error"); in Sync() 120 UniError(EINVAL).ThrowErr(env, "Invalid read file"); in Sync() 127 static UniError AsyncExec(const std::string &path, std::shared_ptr<AsyncReadTextArg> arg, int64_t position, in AsyncExec() 131 return UniError(ENOME in AsyncExec() [all...] |
H A D | posix_fallocate.cpp | 34 UniError(EINVAL).ThrowErr(env, "Invalid fd"); in GetPosixFallocateArg() 40 UniError(EINVAL).ThrowErr(env, "Invalid offset"); in GetPosixFallocateArg() 46 UniError(EINVAL).ThrowErr(env, "Invalid len"); in GetPosixFallocateArg() 57 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Sync() 68 UniError(errno).ThrowErr(env); in Sync() 79 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Async() 88 auto cbExec = [fd = fd, offset = offset, len = len](napi_env env) -> UniError { in Async() 90 return UniError(errno); in Async() 92 return UniError(ERRNO_NOERR); in Async() 96 auto cbCompl = [](napi_env env, UniError er in Async() [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/class_stream/ |
H A D | stream_n_exporter.cpp | 45 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in ReadSync() 54 UniError(EBADF).ThrowErr(env, "Stream may have been closed"); in ReadSync() 70 UniError(errno).ThrowErr(env); in ReadSync() 76 UniError(errno).ThrowErr(env); in ReadSync() 86 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in CloseSync() 92 UniError(EINVAL).ThrowErr(env, "Stream may have been closed yet"); in CloseSync() 105 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in WriteSync() 113 UniError(EBADF).ThrowErr(env, "Stream may has been closed"); in WriteSync() 129 UniError(errno).ThrowErr(env); in WriteSync() 135 UniError(errn in WriteSync() [all...] |
/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fileio/class_watcher/ |
H A D | watcher_n_exporter.cpp | 41 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Constructor() 47 UniError(EIO).ThrowErr(env, "INNER BUG. Failed to wrap entity for obj stat"); in Constructor() 58 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in StopSync() 64 UniError(EINVAL).ThrowErr(env, "get watcherEntity fail"); in StopSync() 76 UniError(EINVAL).ThrowErr(env, "Number of arguments unmatched"); in Stop() 82 UniError(EINVAL).ThrowErr(env, "get watcherEntity fail"); in Stop() 86 auto cbExec = [watchEntity](napi_env env) -> UniError { in Stop() 88 return UniError(ERRNO_NOERR); in Stop() 91 auto cbCompl = [](napi_env env, UniError err) -> NVal { in Stop() 121 UniError(EI in Export() [all...] |