统一处理输入目录

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2023-05-26 02:06:41 +00:00
parent 668a3e7582
commit 915d49ab63
9 changed files with 64 additions and 24 deletions
+1
View File
@@ -69,6 +69,7 @@ private:
uint32_t AddConfig(const std::string& argValue);
uint32_t AddStartId(const std::string& argValue);
uint32_t AddCachePath(const std::string& argValue);
void AdaptResourcesDirForInput();
uint32_t CheckParam() const;
uint32_t HandleProcess(int c, const std::string& argValue);
uint32_t ParseFileList(const std::string& fileListPath);
+1 -1
View File
@@ -57,7 +57,7 @@ public:
static bool CopyFileInner(const std::string &src, const std::string &dst);
static bool IsDirectory(const std::string &path);
static std::string RealPath(const std::string &path);
static std::string AdapateLongPath(const std::string &path);
static std::string AdaptLongPath(const std::string &path);
private:
bool IsIgnore(const std::string &filename) const;
+18 -2
View File
@@ -16,9 +16,10 @@
#ifndef OHOS_RESTOOL_RESOURCE_UTIL_H
#define OHOS_RESTOOL_RESOURCE_UTIL_H
#include<vector>
#include "resource_data.h"
#include <vector>
#include "file_entry.h"
#include "json/json.h"
#include "resource_data.h"
namespace OHOS {
namespace Global {
@@ -192,6 +193,21 @@ public:
* @return All restype string
*/
static std::string GetAllRestypeString();
/**
* @brief get \base\element dir
* @param string inputpath
* @return resource\base\element dir
*/
static FileEntry::FilePath GetBaseElementPath(const std::string input);
/**
* @brief get main dir
* @param string inputpath
* @return main dir
*/
static FileEntry::FilePath GetMainPath(const std::string input);
private:
enum class IgnoreType {
IGNORE_FILE,