Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dCache
cta
Commits
4317c67d
Commit
4317c67d
authored
9 years ago
by
Daniele Kruse
Browse files
Options
Downloads
Patches
Plain Diff
renamed the ctacopycmd to ctacmd
parent
c62aa4eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmdline/CTACmd.cpp
+6
-6
6 additions, 6 deletions
cmdline/CTACmd.cpp
cmdline/CTACmd.hpp
+3
-3
3 additions, 3 deletions
cmdline/CTACmd.hpp
cmdline/CTACmdMain.cpp
+1
-1
1 addition, 1 deletion
cmdline/CTACmdMain.cpp
with
10 additions
and
10 deletions
cmdline/CTACmd.cpp
+
6
−
6
View file @
4317c67d
...
...
@@ -30,13 +30,13 @@
//------------------------------------------------------------------------------
// constructor
//------------------------------------------------------------------------------
cta
::
cmdline
::
CTAC
opyC
md
::
CTAC
opyC
md
()
throw
()
{
cta
::
cmdline
::
CTACmd
::
CTACmd
()
throw
()
{
}
//------------------------------------------------------------------------------
// main
//------------------------------------------------------------------------------
int
cta
::
cmdline
::
CTAC
opyC
md
::
main
(
const
int
argc
,
const
char
**
argv
)
const
throw
()
{
int
cta
::
cmdline
::
CTACmd
::
main
(
const
int
argc
,
const
char
**
argv
)
const
throw
()
{
try
{
return
sendCommand
(
argc
,
argv
);
}
catch
(
cta
::
exception
::
Exception
&
ex
)
{
...
...
@@ -54,7 +54,7 @@ int cta::cmdline::CTACopyCmd::main(const int argc, const char **argv) const thro
//------------------------------------------------------------------------------
// sendCommand
//------------------------------------------------------------------------------
int
cta
::
cmdline
::
CTAC
opyC
md
::
sendCommand
(
const
int
argc
,
const
char
**
argv
)
const
{
int
cta
::
cmdline
::
CTACmd
::
sendCommand
(
const
int
argc
,
const
char
**
argv
)
const
{
XrdCl
::
PropertyList
properties
;
properties
.
Set
(
"source"
,
formatCommandPath
(
argc
,
argv
));
properties
.
Set
(
"target"
,
"-"
);
//destination is stdout
...
...
@@ -85,7 +85,7 @@ int cta::cmdline::CTACopyCmd::sendCommand(const int argc, const char **argv) con
//------------------------------------------------------------------------------
// formatCommandPath
//------------------------------------------------------------------------------
std
::
string
cta
::
cmdline
::
CTAC
opyC
md
::
formatCommandPath
(
const
int
argc
,
const
char
**
argv
)
const
{
std
::
string
cta
::
cmdline
::
CTACmd
::
formatCommandPath
(
const
int
argc
,
const
char
**
argv
)
const
{
std
::
string
cmdPath
=
"root://"
+
castor
::
common
::
CastorConfiguration
::
getConfig
().
getConfEntString
(
"TapeServer"
,
"CTAFrontendHostAndPort"
)
+
"//"
;
for
(
int
i
=
0
;
i
<
argc
;
i
++
)
{
if
(
i
)
cmdPath
+=
"&"
;
...
...
@@ -97,7 +97,7 @@ std::string cta::cmdline::CTACopyCmd::formatCommandPath(const int argc, const ch
//------------------------------------------------------------------------------
// replaceAll
//------------------------------------------------------------------------------
void
cta
::
cmdline
::
CTAC
opyC
md
::
replaceAll
(
std
::
string
&
str
,
const
std
::
string
&
from
,
const
std
::
string
&
to
)
const
{
void
cta
::
cmdline
::
CTACmd
::
replaceAll
(
std
::
string
&
str
,
const
std
::
string
&
from
,
const
std
::
string
&
to
)
const
{
if
(
from
.
empty
()
||
str
.
empty
())
return
;
size_t
start_pos
=
0
;
...
...
@@ -110,7 +110,7 @@ void cta::cmdline::CTACopyCmd::replaceAll(std::string& str, const std::string& f
//------------------------------------------------------------------------------
// encode
//------------------------------------------------------------------------------
std
::
string
cta
::
cmdline
::
CTAC
opyC
md
::
encode
(
const
std
::
string
msg
)
const
{
std
::
string
cta
::
cmdline
::
CTACmd
::
encode
(
const
std
::
string
msg
)
const
{
std
::
string
ret
;
const
bool
noNewLineInBase64Output
=
false
;
CryptoPP
::
StringSource
ss1
(
msg
,
true
,
new
CryptoPP
::
Base64Encoder
(
new
CryptoPP
::
StringSink
(
ret
),
noNewLineInBase64Output
));
...
...
This diff is collapsed.
Click to expand it.
cmdline/CTACmd.hpp
+
3
−
3
View file @
4317c67d
...
...
@@ -25,12 +25,12 @@ namespace cta { namespace cmdline {
/**
* Class implementing the business logic of the archive command-line tool.
*/
class
CTAC
opyC
md
{
class
CTACmd
{
public:
/**
* Constructor.
*/
CTAC
opyC
md
()
throw
();
CTACmd
()
throw
();
/**
* The entry function of the command.
...
...
@@ -84,7 +84,7 @@ private:
*/
std
::
string
encode
(
const
std
::
string
msg
)
const
;
};
// class CTAC
opyC
md
};
// class CTACmd
}}
This diff is collapsed.
Click to expand it.
cmdline/CTACmdMain.cpp
+
1
−
1
View file @
4317c67d
...
...
@@ -23,7 +23,7 @@
//------------------------------------------------------------------------------
int
main
(
const
int
argc
,
const
char
**
argv
)
{
cta
::
cmdline
::
CTAC
opyC
md
command
;
cta
::
cmdline
::
CTACmd
command
;
return
command
.
main
(
argc
,
argv
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment