/ohos5.0/base/security/selinux_adapter/sepolicy/base/te/ |
H A D | filesystem.te | 14 allow bootevent_param tmpfs:filesystem { associate }; 21 allow const_param tmpfs:filesystem { associate }; 25 allow debug_param tmpfs:filesystem { associate }; 26 allow default_param tmpfs:filesystem { associate }; 29 allow hilog_param tmpfs:filesystem { associate }; 30 allow hook_param tmpfs:filesystem { associate }; 33 allow hw_sc_param tmpfs:filesystem { associate }; 34 allow init_param tmpfs:filesystem { associate }; 37 allow net_param tmpfs:filesystem { associate }; 40 allow ohos_param tmpfs:filesystem { associate }; [all …]
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeEngine/src/io/ |
H A D | file_manager.cpp | 132 if (filesystem) { in OpenFile() 133 return filesystem->OpenFile(path); in OpenFile() 150 if (filesystem) { in CreateFile() 168 if (filesystem) { in DeleteFile() 188 if (filesystem) { in Rename() 207 if (filesystem) { in GetEntry() 208 return filesystem->GetEntry(path); in GetEntry() 224 if (filesystem) { in OpenDirectory() 242 if (filesystem) { in CreateDirectory() 260 if (filesystem) { in DeleteDirectory() [all …]
|
H A D | std_filesystem.cpp | 19 #if __has_include(<filesystem>) 55 std::filesystem::path U8Path(string_view str) in U8Path() 57 return std::filesystem::u8path(str.begin().ptr(), str.end().ptr()); in U8Path() 115 return std::filesystem::remove(U8Path(path), ec) && !ec; in DeleteFile() 149 return std::filesystem::remove(U8Path(path), ec) && !ec; in DeleteDirectory() 165 std::filesystem::rename(U8Path(pathFrom), U8Path(pathTo), ec); in Rename() 200 auto canonicalPath = std::filesystem::canonical(U8Path(uri), ec); in CORE_BEGIN_NAMESPACE() 204 auto status = std::filesystem::status(canonicalPath, ec); in CORE_BEGIN_NAMESPACE() 208 auto time = std::filesystem::last_write_time(canonicalPath, ec); in CORE_BEGIN_NAMESPACE() 214 if (std::filesystem::is_directory(status)) { in CORE_BEGIN_NAMESPACE() [all …]
|
H A D | std_directory.cpp | 21 #if __has_include(<filesystem>) 62 uint64_t GetTimeStamp(const std::filesystem::directory_entry& entry) in GetTimeStamp() 67 IDirectory::Entry::Type GetEntryType(const std::filesystem::directory_entry& entry) in GetEntryType() 79 std::filesystem::path U8Path(string_view str) in U8Path() 81 return std::filesystem::u8path(str.begin().ptr(), str.end().ptr()); in U8Path() 102 if (std::filesystem::create_directory(U8Path(path), ec)) { in Create() 112 if (std::filesystem::is_directory(U8Path(path), ec)) { in Open() 126 for (auto& iter : std::filesystem::directory_iterator(U8Path(dir_->path_), ec)) { in GetEntries() 253 std::filesystem::path fsPath = std::filesystem::canonical(U8Path(path), ec); in ResolveAbsolutePath()
|
H A D | std_file.cpp | 21 #if __has_include(<filesystem>) 82 std::filesystem::path U8Path(string_view str) in U8Path() 84 return std::filesystem::u8path(str.begin().ptr(), str.end().ptr()); in U8Path() 111 auto canonicalPath = std::filesystem::canonical(U8Path(path), ec); in Open() 116 if (std::filesystem::is_directory(canonicalPath)) { in Open() 145 auto canonicalPath = std::filesystem::weakly_canonical(U8Path(path), ec); in Create()
|
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/ |
H A D | movedir.cpp | 42 filesystem::path pathName(path); in JudgeExistAndEmpty() 54 filesystem::path pathName(path); in RmDirectory() 84 if (!resGetFirstArg || !filesystem::is_directory(filesystem::status(src.get()))) { in ParseJsOperand() 89 if (!resGetSecondArg || !filesystem::is_directory(filesystem::status(dest.get()))) { in ParseJsOperand() 107 filesystem::path dstPath(dest); in CopyAndDeleteFile() 116 filesystem::path srcPath(src); in CopyAndDeleteFile() 117 …if (!filesystem::copy_file(srcPath, dstPath, filesystem::copy_options::overwrite_existing, errCode… in CopyAndDeleteFile() 126 filesystem::path dstPath(dest); in RenameFile() 141 filesystem::path srcPath(src); in RenameFile() 160 filesystem::path destPath(dest); in RenameDir() [all …]
|
H A D | copydir.cpp | 40 if (dest.find(src) == 0 || filesystem::path(src).parent_path() == dest) { in AllowToCopy() 51 if (!resGetFirstArg || !filesystem::is_directory(filesystem::status(src.get()))) { in ParseAndCheckJsOperand() 56 if (!resGetSecondArg || !filesystem::is_directory(filesystem::status(dest.get()))) { in ParseAndCheckJsOperand() 77 filesystem::path destDir(path); in MakeDir() 79 if (!filesystem::create_directory(destDir, errCode)) { in MakeDir() 93 filesystem::path destFile(destPath); in RemoveFile() 95 if (!filesystem::remove(destFile, errCode)) { in RemoveFile() 116 filesystem::path dstPath(dest); in CopyFile() 118 if (filesystem::exists(dstPath, errCode)) { in CopyFile() 129 filesystem::path srcPath(src); in CopyFile() [all …]
|
H A D | move.cpp | 41 if (!filesystem::is_directory(path, errCode)) { in CheckDir() 102 filesystem::path dstPath(dest); in CopyAndDeleteFile() 104 if (filesystem::exists(dstPath, errCode)) { in CopyAndDeleteFile() 105 if (!filesystem::remove(dstPath, errCode)) { in CopyAndDeleteFile() 110 filesystem::path srcPath(src); in CopyAndDeleteFile() 111 …if (!filesystem::copy_file(srcPath, dstPath, filesystem::copy_options::overwrite_existing, errCode… in CopyAndDeleteFile()
|
/ohos5.0/foundation/window/window_manager/window_scene/session/host/src/ |
H A D | scene_persistent_storage.cpp | 68 std::filesystem::path fileDir {saveDir_}; in InitDir() 69 if (!std::filesystem::exists(fileDir)) { in InitDir() 70 std::filesystem::create_directories(fileDir); in InitDir() 71 …std::filesystem::permissions(fileDir, std::filesystem::perms::owner_read | std::filesystem::perms:… in InitDir() 72 std::filesystem::perms::group_read | std::filesystem::perms::group_write); in InitDir()
|
/ohos5.0/base/global/i18n/services/src/ |
H A D | hmos_timezone_mount.cpp | 100 void ensureDirectoryExists(const std::filesystem::path& dir_path) in ensureDirectoryExists() 103 if (!std::filesystem::exists(dir_path)) { in ensureDirectoryExists() 105 std::filesystem::create_directories(dir_path, ec); in ensureDirectoryExists() 113 void clearPath(const std::filesystem::path& dir_path) in clearPath() 116 for (const auto& entry : std::filesystem::directory_iterator(dir_path)) { in clearPath() 117 std::filesystem::remove_all(entry.path(), ec); in clearPath() 125 bool copySingleFile(const std::filesystem::path& src_path, const std::filesystem::path& dst_path) in copySingleFile() 150 std::filesystem::path safe_dir(SAFE_PATH); in CopyDataFile() 155 std::filesystem::path src_path = std::filesystem::path(CFG_PATH) / file; in CopyDataFile() 156 std::filesystem::path dst_path = std::filesystem::path(SAFE_PATH) / file; in CopyDataFile()
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/security/dlp_permission_service/system/ |
H A D | appspawn.te | 21 …use" ino=1 scontext=u:r:appspawn:s0 tcontext=u:object_r:fuse_file:s0 tclass=filesystem permissive=1 22 allow appspawn fuse_file:filesystem { mount }; 24 …"appspawn" scontext=u:r:appspawn:s0 tcontext=u:object_r:fuse_file:s0 tclass=filesystem permissive=1 25 allow appspawn fuse_file:filesystem { unmount }; 31 …nager" scontext=u:r:appspawn:s0 tcontext=u:object_r:dlp_fuse_file:s0 tclass=filesystem permissive=1 32 …nager" scontext=u:r:appspawn:s0 tcontext=u:object_r:dlp_fuse_file:s0 tclass=filesystem permissive=1 33 allow appspawn dlp_fuse_file:filesystem { mount relabelfrom relabelto }; 35 …lpmanager" scontext=u:r:appspawn:s0 tcontext=u:object_r:fuse_file:s0 tclass=filesystem permissive=1 36 allow appspawn fuse_file:filesystem { relabelfrom }; 38 …nager" scontext=u:r:appspawn:s0 tcontext=u:object_r:dlp_fuse_file:s0 tclass=filesystem permissive=0 [all …]
|
/ohos5.0/base/security/selinux_adapter/sepolicy/base/public/ |
H A D | filesystem.te | 14 allow fs_attr self:filesystem associate; 15 allow file_attr labeledfs:filesystem associate; 16 allow dev_attr tmpfs:filesystem associate; 18 neverallow storage_daemon ~{ exfat vfat ntfs hmdfs sharefs tmpfs labeledfs }:filesystem unmount; 19 …esystem_violators sharefs tmpfs dlp_fuse_file fuse_file proc_file proc_random }:filesystem unmount; 20 neverallow nwebspawn ~{ tmpfs labeledfs }:filesystem unmount; 21 neverallow hdcd ~{ labeledfs }:filesystem remount;
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/update/updater/system/ |
H A D | filesystem.te | 15 …fs" ino=1 scontext=u:object_r:rootfs:s0 tcontext=u:object_r:tmpfs:s0 tclass=filesystem permissive=1 16 allow rootfs tmpfs:filesystem { associate }; 18 …ntext=u:object_r:updater_binary_exec:s0 tcontext=u:object_r:tmpfs:s0 tclass=filesystem permissive=1 19 allow updater_binary_exec tmpfs:filesystem { associate }; 21 …ontext=u:object_r:faultloggerd_exec:s0 tcontext=u:object_r:rootfs:s0 tclass=filesystem permissive=1 22 allow faultloggerd_exec rootfs:filesystem { associate }; 24 …context=u:object_r:processdump_exec:s0 tcontext=u:object_r:rootfs:s0 tclass=filesystem permissive=1 25 allow processdump_exec rootfs:filesystem { associate };
|
H A D | init.te | 55 allow system_file rootfs:filesystem { associate }; 65 allow system_bin_file rootfs:filesystem { associate }; 72 allow system_lib_file rootfs:filesystem { associate }; 80 allow system_etc_file rootfs:filesystem { associate }; 89 allow vendor_file rootfs:filesystem { associate }; 93 allow data_file rootfs:filesystem { associate }; 96 allow init tmpfs:filesystem { mount }; 99 allow data_log rootfs:filesystem { associate }; 111 allow config_file rootfs:filesystem { associate }; 154 allow vendor_lib_file rootfs:filesystem { associate }; [all …]
|
/ohos5.0/base/update/updateservice/services/core/ability/utils/src/ |
H A D | file_utils.cpp | 40 int64_t fileSize = static_cast<int64_t>(std::filesystem::file_size(fileName, errorCode)); in GetFileSize() 91 auto myPath = std::filesystem::path(rootPath); in DeleteFile() 97 for (auto const &dirEntry : std::filesystem::directory_iterator { myPath }) { in DeleteFile() 102 void FileUtils::RemoveAll(const std::filesystem::path &path) in RemoveAll() 105 std::filesystem::remove_all(path, errorCode); in RemoveAll() 138 auto curDir = std::filesystem::path(fileDir); in GetParentDir() 189 std::filesystem::create_directory(fileDir, errorCode); in CreatDirWithPermission() 195 std::filesystem::permissions(fileDir, static_cast<std::filesystem::perms>(dirPermission), in CreatDirWithPermission() 196 std::filesystem::perm_options::replace, errorCode); in CreatDirWithPermission()
|
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/cj/src/ |
H A D | copy_dir.cpp | 34 std::filesystem::path destDir(path); in MakeDir() 36 if (!std::filesystem::create_directory(destDir, errCode)) { in MakeDir() 50 std::filesystem::path destFile(destPath); in RemoveFile() 52 if (!std::filesystem::remove(destFile, errCode)) { in RemoveFile() 73 std::filesystem::path dstPath(dest); in CopyFile() 74 if (std::filesystem::exists(dstPath)) { in CopyFile() 81 std::filesystem::path srcPath(src); in CopyFile() 83 …if (!std::filesystem::copy_file(srcPath, dstPath, std::filesystem::copy_options::overwrite_existin… in CopyFile() 93 if (!std::filesystem::exists(destPath)) { in CopySubDir() 174 if (!std::filesystem::exists(destStr)) { in CopyDirFunc() [all …]
|
H A D | move_file.cpp | 41 if (!filesystem::is_directory(filesystem::status(path))) { in CheckDir() 93 filesystem::path dstPath(dest); in CopyAndDeleteFile() 95 if (filesystem::exists(dstPath)) { in CopyAndDeleteFile() 96 if (!filesystem::remove(dstPath, errCode)) { in CopyAndDeleteFile() 101 filesystem::path srcPath(src); in CopyAndDeleteFile() 102 …if (!filesystem::copy_file(srcPath, dstPath, filesystem::copy_options::overwrite_existing, errCode… in CopyAndDeleteFile()
|
H A D | file_fs_impl.cpp | 416 filesystem::path pathName(path); in JudgeExistAndEmpty() 428 filesystem::path pathName(path); in RmDirectory() 510 filesystem::path destPath(dest); in RenameDir() 514 filesystem::path srcPath(src); in RenameDir() 539 filesystem::path dstPath(dest); in CopyAndDeleteFile() 547 filesystem::path srcPath(src); in CopyAndDeleteFile() 563 filesystem::path dstPath(dest); in RenameFile() 574 filesystem::path srcPath(src); in RenameFile() 587 filesystem::path dpath(destPath); in RecurMoveDir() 725 if (!filesystem::is_directory(filesystem::status(src))) { in MoveDir() [all …]
|
/ohos5.0/base/security/selinux_adapter/sepolicy/ohos_policy/startup/init/public/ |
H A D | init.te | 30 allow bootevent_wms_param tmpfs:filesystem associate; 32 allow dhardware_dm_param tmpfs:filesystem associate; 34 allow persist_audio_param tmpfs:filesystem associate; 36 allow arkcompiler_param tmpfs:filesystem associate; 39 allow arkui_param tmpfs:filesystem associate; 46 allow pasteboard_param tmpfs:filesystem associate; 48 allow time_param tmpfs:filesystem associate; 50 allow accesstoken_perm_param tmpfs:filesystem associate; 59 allow i18n_param tmpfs:filesystem associate; 63 allow const_i18n_param tmpfs:filesystem associate; [all …]
|
/ohos5.0/foundation/filemanagement/file_api/interfaces/kits/js/src/mod_fs/properties/copy_listener/ |
H A D | trans_listener.cpp | 42 std::filesystem::path pathName(path); in RmDir() 44 if (std::filesystem::exists(pathName, errCode)) { in RmDir() 45 std::filesystem::remove_all(pathName, errCode); in RmDir() 58 while (std::filesystem::exists(DISTRIBUTED_PATH + random)) { in CreateDfsCopyPath() 165 if (!std::filesystem::create_directory(disSandboxPath, errCode)) { in PrepareCopySession() 176 if (std::filesystem::exists(sandboxDir, errCode)) { in PrepareCopySession() 200 if (std::filesystem::exists(sandboxPath) && std::filesystem::is_directory(sandboxPath)) { in CopyToSandBox() 202 std::filesystem::copy(disSandboxPath, sandboxPath, in CopyToSandBox() 203 …std::filesystem::copy_options::recursive | std::filesystem::copy_options::update_existing, errCode… in CopyToSandBox() 221 …std::filesystem::copy(disSandboxPath + fileName, sandboxPath, std::filesystem::copy_options::updat… in CopyToSandBox()
|
/ohos5.0/base/security/huks/services/huks_standard/huks_service/main/os_dependency/sa/ |
H A D | hks_sa.cpp | 346 std::filesystem::create_directory(newDir, errCode); in MoveMineOldFile() 350 std::filesystem::copy(curPath, newPath, in MoveMineOldFile() 351 …std::filesystem::copy_options::recursive | std::filesystem::copy_options::overwrite_existing, errC… in MoveMineOldFile() 357 std::filesystem::remove_all(curPath, errCode); in MoveMineOldFile() 369 std::filesystem::create_directory(newDir, errCode); in MoveDirectoryTree() 375 std::filesystem::copy(oldDir, newDir, in MoveDirectoryTree() 376 …std::filesystem::copy_options::recursive | std::filesystem::copy_options::overwrite_existing, errC… in MoveDirectoryTree() 383 std::filesystem::remove_all(oldDir, errCode); in MoveDirectoryTree()
|
/ohos5.0/foundation/multimedia/media_foundation/services/media_monitor/server/src/ |
H A D | media_monitor_service.cpp | 417 std::filesystem::directory_iterator iter(BETA_DUMP_DIR, errorCode); in DumpFileClear() 455 std::filesystem::directory_iterator iter(fileFloader_, errorCode); in HistoryFilesHandle() 460 std::vector<std::filesystem::path> mediaFileVecs; in HistoryFilesHandle() 462 if (std::filesystem::is_regular_file(elem.status())) { in HistoryFilesHandle() 469 [](const std::filesystem::path &file1, const std::filesystem::path &file2) { in HistoryFilesHandle() 470 return std::filesystem::file_time_type(std::filesystem::last_write_time(file1)) < in HistoryFilesHandle() 471 std::filesystem::file_time_type(std::filesystem::last_write_time(file2)); in HistoryFilesHandle()
|
/ohos5.0/foundation/graphic/graphic_3d/lume/LumeBinaryCompile/LumeShaderCompiler/src/ |
H A D | main.cpp | 537 std::vector<std::filesystem::path> shaderIncludePaths; 539 std::filesystem::path& shaderSourcePath; 540 std::filesystem::path& compiledShaderDestinationPath; 720 std::filesystem::path path; in include() 727 found = std::filesystem::exists(path); in include() 733 found = std::filesystem::exists(path); in include() 1578 …std::filesystem::copy(inputFilename, outputFilename, std::filesystem::copy_options::overwrite_exis… in runAllCompilationStages() 1778 std::filesystem::path const currentFolder = std::filesystem::current_path(); in main() 1782 std::filesystem::path sourceFile; in main() 1866 if (!std::filesystem::exists(shaderSourcesPath)) { in main() [all …]
|
/ohos5.0/base/theme/wallpaper_mgr/utils/src/ |
H A D | file_deal.cpp | 27 namespace fs = std::filesystem; 61 std::filesystem::path dstPath(newFile); in CopyFile() 62 std::filesystem::path srcPath(sourceFile); in CopyFile() 64 …if (!std::filesystem::copy_file(srcPath, dstPath, std::filesystem::copy_options::overwrite_existin… in CopyFile()
|
/ohos5.0/foundation/multimedia/image_framework/frameworks/innerkitsimpl/test/unittest/ |
H A D | jpg_yuv_test.cpp | 217 std::filesystem::path dir(outpath); in YuvWriteToFile() 1365 std::filesystem::path dir("scale"); 1366 if (!std::filesystem::exists(dir)) { 1402 std::filesystem::path dir("resize"); 1422 std::filesystem::path dir("flip"); 1557 std::filesystem::path dir("read"); 1579 std::filesystem::path dir("write"); 1655 std::filesystem::path dir("scale"); 1712 std::filesystem::path dir("flip"); 1802 std::filesystem::path dir("scale"); [all …]
|