Home
last modified time | relevance | path

Searched refs:mode (Results 1 - 25 of 26) sorted by relevance

12

/commonlibrary/c_utils/base/test/unittest/rust/
H A Drust_utils_directory_test.rs180 let mut mode = directory_ex::S_IRWXU | directory_ex::S_IRWXG | directory_ex::S_IRWXO; in test_get_folder_size_001() variables
182 ret = directory_ex::ffi::ChangeModeFile(&txt, &mode); in test_get_folder_size_001()
185 mode = directory_ex::S_IRUSR | directory_ex::S_IRGRP | directory_ex::S_IROTH; in test_get_folder_size_001()
186 ret = directory_ex::ffi::ChangeModeDirectory(&dirpath, &mode); in test_get_folder_size_001()
197 let mode = directory_ex::S_IRWXU | directory_ex::S_IRWXG | directory_ex::S_IRWXO; in test_change_mode_file_001()
198 let ret = directory_ex::ffi::ChangeModeFile(&dirpath, &mode); in test_change_mode_file_001()
206 let mode = directory_ex::S_IRUSR | directory_ex::S_IRGRP | directory_ex::S_IROTH; in test_change_mode_directory_001()
207 let ret = directory_ex::ffi::ChangeModeDirectory(&dirpath, &mode); in test_change_mode_directory_001()
/commonlibrary/c_utils/base/test/fuzztest/directory_fuzzer/
H A Ddirectory_fuzzer.cpp64 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; in DirectoryTestFunc() local
65 ChangeModeFile(fileFullPath, mode); in DirectoryTestFunc()
66 ChangeModeDirectory(testDir, mode); in DirectoryTestFunc()
67 ChangeModeDirectory("", mode); in DirectoryTestFunc()
/commonlibrary/utils_lite/hals/file/
H A Dhal_file.c21 int HalFileOpen(const char *path, int oflag, int mode) in HalFileOpen() argument
23 (void)mode; in HalFileOpen()
H A Dhal_file.h25 int HalFileOpen(const char* path, int oflag, int mode);
/commonlibrary/c_utils/base/src/rust/
H A Ddirectory_ex.rs91 pub fn ChangeModeFile(fileName: &CxxString, mode: &u32) -> bool; in ChangeModeFile()
95 pub fn ChangeModeDirectory(path: &CxxString, mode: &u32) -> bool; in ChangeModeDirectory()
/commonlibrary/c_utils/base/src/
H A Ddirectory_ex.cpp359 bool ChangeMode(const string& fileName, const mode_t& mode) in ChangeMode() argument
361 return (chmod(fileName.c_str(), mode) == 0); in ChangeMode()
364 bool ChangeModeFile(const string& fileName, const mode_t& mode) in ChangeModeFile() argument
370 return ChangeMode(fileName, mode); in ChangeModeFile()
373 bool ChangeModeDirectory(const string& path, const mode_t& mode) in ChangeModeDirectory() argument
394 ret = ChangeModeDirectory(subPath, mode); in ChangeModeDirectory()
397 if (!ChangeMode(subPath, mode)) { in ChangeModeDirectory()
408 if (!ChangeMode(currentPath, mode)) { in ChangeModeDirectory()
H A Dfile_ex.cpp339 uint32_t mode = truncated ? (ios::out | ios::binary | ios::trunc) : (ios::out | ios::binary | ios::app); in SaveBufferToFile() local
341 file.open(filePath.c_str(), mode); in SaveBufferToFile()
343 UTILS_LOGD("open file failed! filePath:%{private}s, mode:%{private}d", filePath.c_str(), mode); in SaveBufferToFile()
H A Dmapped_file.cpp30 MappedFile::MappedFile(std::string& path, MapMode mode, off_t offset, off_t size, const char *hint) in MappedFile() argument
31 :path_(path), size_(size), offset_(offset), mode_(mode), hint_(hint) {} in MappedFile()
/commonlibrary/c_utils/base/test/benchmarktest/directory_benchmark_test/
H A Ddirectory_benchmark_test.cpp370 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; in BENCHMARK_F() local
371 ret = ChangeModeFile(dirpath + "test.txt", mode); in BENCHMARK_F()
374 mode = S_IRUSR | S_IRGRP | S_IROTH; in BENCHMARK_F()
375 ret = ChangeModeDirectory(dirpath, mode); in BENCHMARK_F()
393 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; in BENCHMARK_F() local
394 bool ret = ChangeModeFile(dirpath + "test.txt", mode); in BENCHMARK_F()
409 mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; in BENCHMARK_F() local
410 bool ret = ChangeModeDirectory(dirpath, mode); in BENCHMARK_F()
/commonlibrary/c_utils/base/test/unittest/common/
H A Dutils_directory_test.cpp467 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; in HWTEST_F() local
468 ret = ChangeModeFile(dirpath + "test.txt", mode); in HWTEST_F()
471 mode = S_IRUSR | S_IRGRP | S_IROTH; in HWTEST_F()
472 ret = ChangeModeDirectory(dirpath, mode); in HWTEST_F()
486 mode_t mode = S_IRWXU | S_IRWXG | S_IRWXO; in HWTEST_F() local
487 bool ret = ChangeModeFile(dirpath + "test.txt", mode); in HWTEST_F()
498 mode_t mode = S_IRUSR | S_IRGRP | S_IROTH; in HWTEST_F() local
499 bool ret = ChangeModeDirectory(dirpath, mode); in HWTEST_F()
H A Dutils_mapped_file_test.cpp321 // check map-mode in HWTEST_F()
373 // check map-mode in HWTEST_F()
1244 * @tc.desc: Test mapping file with invalid mapping mode, but can be auto adjusted.
1255 MapMode mode = static_cast<MapMode>(1) | static_cast<MapMode>(16) | in HWTEST_F() local
1257 MappedFile mf(filename, mode); in HWTEST_F()
1264 // 4. check map-mode in HWTEST_F()
1359 MapMode mode = mf.GetMode(); in HWTEST_F() local
1380 EXPECT_EQ(mfNew.GetMode(), mode); in HWTEST_F()
1407 MapMode mode = mf.GetMode(); in HWTEST_F() local
1429 EXPECT_EQ(mfNew.GetMode(), mode); in HWTEST_F()
1464 MapMode mode = mf1.GetMode(); HWTEST_F() local
1509 MapMode mode = mf1.GetMode(); HWTEST_F() local
[all...]
/commonlibrary/c_utils/base/include/
H A Ddirectory_ex.h142 * @param mode Indicates the permissions on the file.
147 bool ChangeModeFile(const std::string& fileName, const mode_t& mode);
153 * @param mode Indicates the permissions. For details, see <b>chmod()</b>.
157 bool ChangeModeDirectory(const std::string& path, const mode_t& mode);
H A Dmapped_file.h50 MapMode mode = MapMode::DEFAULT,
145 bool ChangeMode(MapMode mode);
/commonlibrary/utils_lite/file/src/file_impl_hal/
H A Dfile.c26 int UtilsFileOpen(const char* path, int oflag, int mode) in UtilsFileOpen() argument
28 return HalFileOpen(path, oflag, mode); in UtilsFileOpen()
/commonlibrary/ets_utils/js_concurrent_module/utils/locks/
H A Dasync_lock.cpp39 napi_value AsyncLock::LockAsync(napi_env env, napi_ref cb, LockMode mode, const LockOptions &options) in LockAsync() argument
45 new LockRequest(this, AsyncLockManager::GetCurrentTid(env), env, cb, mode, options, deferred); in LockAsync()
202 napi_value mode; in CreateLockInfo() local
203 NAPI_CALL(env, napi_create_int32(env, rq->GetMode(), &mode)); in CreateLockInfo()
209 DECLARE_NAPI_PROPERTY("mode", mode), in CreateLockInfo()
H A Dasync_lock_manager.cpp264 LockMode mode = LOCK_MODE_EXCLUSIVE; in LockAsync() local
266 if (argc > 1 && !GetLockMode(env, argv[1], mode)) { in LockAsync()
267 ErrorHelper::ThrowError(env, ErrorHelper::TYPE_ERROR, "Invalid lock mode."); in LockAsync()
276 return asyncLock->LockAsync(env, callback, mode, options); in LockAsync()
445 bool AsyncLockManager::GetLockMode(napi_env env, napi_value val, LockMode &mode) in GetLockMode() argument
451 mode = static_cast<LockMode>(modeNative); in GetLockMode()
H A Dasync_lock.h40 napi_value LockAsync(napi_env env, napi_ref cb, LockMode mode, const LockOptions &options);
H A Dasync_lock_manager.h68 static bool GetLockMode(napi_env env, napi_value val, LockMode &mode);
H A Dlock_request.h44 LockRequest(AsyncLock* lock, tid_t tid, napi_env env, napi_ref cb, LockMode mode, const LockOptions &options,
H A Dlock_request.cpp29 LockRequest::LockRequest(AsyncLock *lock, tid_t tid, napi_env env, napi_ref cb, LockMode mode, in LockRequest() argument
35 mode_(mode), in LockRequest()
/commonlibrary/ets_utils/js_concurrent_module/worker/
H A Dworker.h48 WorkerListener(napi_env env, napi_ref callback, ListenerMode mode) in WorkerListener()
49 : env_(env), callback_(callback), mode_(mode) in WorkerListener()
63 void SetMode(ListenerMode mode) in SetMode()
65 mode_ = mode; in SetMode()
262 static napi_value AddListener(napi_env env, napi_callback_info cbinfo, ListenerMode mode);
405 void SetScriptMode(ScriptMode mode) in SetScriptMode() argument
407 scriptMode_ = mode; in SetScriptMode()
/commonlibrary/utils_lite/include/
H A Dutils_file.h83 * @brief Defines a flag used by{@link UtilsFileOpen} to open a file in read-only mode.
91 * @brief Defines a flag used by {@link UtilsFileOpen} to open a file in write-only mode.
99 * @brief Defines a flag used by {@link UtilsFileOpen} to open a file in read-and-write mode.
127 * if the file exists and can be opened in write mode.
146 * @param oflag Indicates the mode of opening a file. The following modes are supported.
157 * @param mode Used for function compatibility. This parameter does not take effect in any scenario.
162 int UtilsFileOpen(const char* path, int oflag, int mode);
/commonlibrary/rust/ylong_http/ylong_http_client/src/util/c_openssl/ssl/
H A Dctx.rs257 pub(crate) fn set_verify(&mut self, mode: c_int) {
259 unsafe { SSL_CTX_set_verify(ptr, mode, None) };
/commonlibrary/c_utils/base/test/benchmarktest/mapped_benchmark_test/
H A Dmapped_benchmark_test.cpp181 // check map-mode in BENCHMARK_F()
240 // check map-mode in BENCHMARK_F()
1356 * @tc.desc: Test mapping file with invalid mapping mode, but can be auto adjusted.
1371 MapMode mode = static_cast<MapMode>(mapMode1) | static_cast<MapMode>(mapMode2) | in BENCHMARK_F() local
1373 MappedFile mf(filename, mode); in BENCHMARK_F()
1380 // 4. check map-mode in BENCHMARK_F()
1487 MapMode mode = mf.GetMode(); in BENCHMARK_F() local
1511 AssertEqual(mfNew.GetMode(), mode, "mfNew.GetMode() did not equal mode as expected.", state); in BENCHMARK_F()
1549 MapMode mode in BENCHMARK_F() local
1622 MapMode mode = mf1.GetMode(); BENCHMARK_F() local
1680 MapMode mode = mf1.GetMode(); BENCHMARK_F() local
[all...]
/commonlibrary/ets_utils/js_concurrent_module/utils/test/
H A Dtest_locks.cpp68 static void Loop(LoopMode mode) in Loop() argument
70 engine_->Loop(mode); in Loop()

Completed in 16 milliseconds

12