Go to the documentation of this file.
72 const regExp matcher(
"processors?[0-9]+(_[0-9]+-[0-9]+)?");
74 bool isProcessorDir(
const string& dir)
76 return (dir.
starts_with(
"processor") && matcher.match(dir));
82 int main(
int argc,
char *argv[])
86 "List times using the timeSelector,"
87 " or use to remove selected time directories"
97 "List times from processor0/ directory"
102 "Remove selected time directories"
106 "Report progress of -rm option"
112 const bool removeFiles(
args.
found(
"rm"));
130 <<
"No processor* directories found"
153 const label nTimes = timeDirs.size();
178 <<
"Removing " << nTimes
179 <<
" times in " << procDirs.size()
180 <<
" processor directories" <<
endl;
184 if (procDirs.empty())
197 <<
" [" << (nTimes - timei) <<
'/' << nTimes <<
']'
201 for (
const fileName& procDir : procDirs)
212 <<
"Removing " << nTimes
213 <<
" time directories" <<
endl;
224 <<
" [" << (nTimes - timei) <<
'/' << nTimes <<
']'
235 for (
const instant& t : timeDirs)
static autoPtr< T > New(Args &&... args)
Wrapper around POSIX extended regular expressions with some additional prefix-handling....
void inplaceSubsetList(ListType &input, const UnaryPredicate &pred, const bool invert=false)
A class for handling words, derived from Foam::string.
A class for handling file names.
bool starts_with(const std::string &s) const
const fileName & caseName() const noexcept
static void addNote(const string ¬e)
instantList select(const instantList ×) const
const fileOperation & fileHandler()
Ostream & endl(Ostream &os)
Ostream & flush(Ostream &os)
static void noFunctionObjects(bool addWithOption=false)
virtual label nProcs(const fileName &dir, const fileName &local="") const
int verbose() const noexcept
errorManipArg< error, int > exit(error &err, const int errNo=1)
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
bool rmDir(const fileName &directory, const bool silent=false)
static void addOptions(const bool constant=true, const bool withZero=false)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
#define forAllReverse(list, i)
Various functions to operate on Lists.
An instant of time. Contains the time value and name.
Foam::argList args(argc, argv)
fileNameList readDir(const fileName &directory, const fileName::Type type=fileName::FILE, const bool filtergz=true, const bool followLink=true)
const fileName & rootPath() const noexcept
static void addVerboseOption(const string &usage, bool advanced=false)
bool found(const word &optName) const