1 // ArchiveCommandLine.h
3 #ifndef __ARCHIVECOMMANDLINE_H
4 #define __ARCHIVECOMMANDLINE_H
6 #include "Common/Wildcard.h"
7 #include "Common/CommandLineParser.h"
12 struct CArchiveCommandLineException: public AString
14 CArchiveCommandLineException(const char *errorMessage): AString(errorMessage) {}
17 namespace NCommandType { enum EEnum
30 namespace NRecursedType { enum EEnum
33 kWildCardOnlyRecursed,
37 struct CArchiveCommand
39 NCommandType::EEnum CommandType;
40 bool IsFromExtractGroup() const;
41 bool IsFromUpdateGroup() const;
42 bool IsTestMode() const { return CommandType == NCommandType::kTest; }
43 NExtract::NPathMode::EEnum GetPathMode() const;
46 struct CArchiveCommandLineOptions
55 bool IsStdOutTerminal;
56 bool IsStdErrTerminal;
63 // NWildcard::CCensor ArchiveWildcardCensor;
64 NWildcard::CCensor WildcardCensor;
66 CArchiveCommand Command;
76 NExtract::NOverwriteMode::EEnum OverwriteMode;
77 UStringVector ArchivePathsSorted;
78 UStringVector ArchivePathsFullSorted;
79 CObjectVector<CProperty> ExtractProperties;
81 CUpdateOptions UpdateOptions;
88 UInt32 DictionarySize;
92 CArchiveCommandLineOptions(): StdInMode(false), StdOutMode(false) {};
95 class CArchiveCommandLineParser
97 NCommandLineParser::CParser parser;
99 CArchiveCommandLineParser();
100 void Parse1(const UStringVector &commandStrings, CArchiveCommandLineOptions &options);
101 void Parse2(CArchiveCommandLineOptions &options);