mirror of
https://github.com/openharmony/tools_previewer.git
synced 2026-07-15 12:35:38 -04:00
8474711022
Signed-off-by: libenyao <libenyao@h-partners.com>
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef FILESYSTEM_H
|
|
#define FILESYSTEM_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
class FileSystem {
|
|
public:
|
|
static bool IsFileExists(std::string path);
|
|
static bool IsDirectoryExists(std::string path);
|
|
static std::string GetApplicationPath();
|
|
static const std::string& GetVirtualFileSystemPath();
|
|
static void MakeVirtualFileSystemPath();
|
|
static int MakeDir(std::string path);
|
|
static void SetBundleName(std::string name);
|
|
static std::string GetSeparator();
|
|
private:
|
|
static std::vector<std::string> pathList;
|
|
static std::string separator;
|
|
static std::string bundleName;
|
|
static std::string fileSystemPath;
|
|
static unsigned short GetFileMode(std::string path);
|
|
static const uint32_t MAX_PATH_LEN = 260;
|
|
};
|
|
|
|
#endif // FILESYSTEM_H
|