Jpp
21.0.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
examples
JSystem
rename.cc
Go to the documentation of this file.
1
#include <string>
2
3
#include "
JSystem/JFilesystem.hh
"
4
5
#include "
Jeep/JParser.hh
"
6
7
8
/**
9
* \file
10
*
11
* Rename file.
12
*
13
* \author mdejong
14
*/
15
int
main
(
int
argc,
char
* argv[])
16
{
17
using namespace
std
;
18
using namespace
JPP
;
19
20
string
inputFile;
21
string
outputFile
;
22
23
try
{
24
25
JParser<>
zap;
26
27
zap[
'f'
] =
make_field
(inputFile);
28
zap[
'o'
] =
make_field
(
outputFile
);
29
30
zap(argc, argv);
31
}
32
catch
(
const
exception& error) {
33
FATAL
(error.what() << endl);
34
}
35
36
const
int
ierr = rename(inputFile,
outputFile
);
37
38
if
(ierr != 0) {
39
FATAL
(
"Error renaming "
<< ierr << endl);
40
}
41
}
outputFile
string outputFile
Definition
JDAQTimesliceSelector.cc:37
JFilesystem.hh
FATAL
#define FATAL(A)
Definition
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition
JParser.hh:2107
JPARSER::JParser
Utility class to parse command line options.
Definition
JParser.hh:1664
main
int main()
Definition
km3net-dataformat/build/_deps/km3netcmakesetup-src/examples/codemeta-consumer/main.cc:3
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition
JAAnetToolkit.hh:48
std
Definition
JSTDTypes.hh:14
Generated by
1.12.0