1 /* 2 * Copyright (C) 2024 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 /** 17 * @addtogroup FileIO 18 * @{ 19 * 20 * @brief Provide the definition of the error codes. 21 * @since 12 22 */ 23 24 /** 25 * @file error_code.h 26 * @kit CoreFileKit 27 * @library NA 28 * @brief Declare the error codes of file management module. 29 * @syscap SystemCapability.FileManagement.File.FileIO 30 * @since 12 31 */ 32 33 #ifndef FILE_MANAGEMENT_FILEIO_ERROR_CODE_H 34 #define FILE_MANAGEMENT_FILEIO_ERROR_CODE_H 35 36 #ifdef __cplusplus 37 extern "C" { 38 #endif 39 40 /** 41 * @brief error codes of file management 42 * @since 12 43 */ 44 typedef enum FileManagement_ErrCode { 45 /** 46 * operation completed successfully. 47 */ 48 ERR_OK = 0, 49 /** 50 * permission verification failed. 51 */ 52 ERR_PERMISSION_ERROR = 201, 53 /** 54 * invalid input parameter. 55 */ 56 ERR_INVALID_PARAMETER = 401, 57 /** 58 * device not supported. 59 */ 60 ERR_DEVICE_NOT_SUPPORTED = 801, 61 /** 62 * operation not permitted. 63 */ 64 ERR_EPERM = 13900001, 65 /** 66 * no such file or directory. 67 */ 68 ERR_ENOENT = 13900002, 69 /** 70 * out of memory. 71 */ 72 ERR_ENOMEM = 13900011, 73 /** 74 * unknown error. 75 */ 76 ERR_UNKNOWN = 13900042 77 } FileManagement_ErrCode; 78 79 #ifdef __cplusplus 80 } 81 #endif 82 83 #endif // FILE_MANAGEMENT_FILEIO_ERROR_CODE_H 84 /** @} */ 85