#pragma once #include #include #include "types.h" namespace nstool { class FsProcess { public: FsProcess(); void setInputFileSystem(const std::shared_ptr& input_fs); void setFsFormatName(const std::string& fs_format_name); void setFsProperties(const std::vector& properties); void setShowFsInfo(bool show_fs_info); void setShowFsTree(bool show_fs_tree); void setFsRootLabel(const std::string& root_label); void setExtractJobs(const std::vector& extract_jobs); void process(); private: std::string mModuleLabel; std::shared_ptr mInputFs; // fs info tc::Optional mFsFormatName; bool mShowFsInfo; std::vector mProperties; // fs tree bool mShowFsTree; tc::Optional mFsRootLabel; // extract jobs std::vector mExtractJobs; // cache for file extract tc::ByteData mDataCache; void printFs(); void extractFs(); void visitDir(const tc::io::Path& v_path, const tc::io::Path& l_path, bool extract_fs, bool print_fs); }; }