Skip to content

Commit

Permalink
[XrdCl] Expose kXR_cancel flag in FileSystem::Prepare, closes #699
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed May 9, 2018
1 parent a2fba69 commit 501fbd5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions docs/man/xrdfs.1
Expand Up @@ -188,6 +188,8 @@ Prepare one or more files for access.
\fI-w\fR whe files will be accessed for modification
.br
\fI-p\fR priority of the request, 0 (lowest) - 3 (highest)
.br
\fI-a\fR abort the request

.RE
\fBcat\fR \fI[-o localfile]\fR \fIfile\fR
Expand Down
11 changes: 8 additions & 3 deletions src/XrdCl/XrdClFS.cc
Expand Up @@ -1115,6 +1115,8 @@ XRootDStatus DoPrepare( FileSystem *fs,
flags |= PrepareFlags::Stage;
else if( args[i] == "-w" )
flags |= PrepareFlags::WriteMode;
else if( args[i] == "-a" )
flags |= PrepareFlags::Cancel;
else
files.push_back( args[i] );
}
Expand Down Expand Up @@ -1492,10 +1494,12 @@ XRootDStatus PrintHelp( FileSystem *, Env *,
printf( " Modify permissions. Permission string example:\n" );
printf( " rwxr-x--x\n\n" );

printf( " ls [-l] [-u] [dirname]\n" );
printf( " ls [-l] [-u] [-R] [-D] [dirname]\n" );
printf( " Get directory listing.\n" );
printf( " -l stat every entry and pring long listing\n" );
printf( " -u print paths as URLs\n\n" );
printf( " -R list subdirectories recursively" );
printf( " -D show duplicate entries" );

printf( " locate [-n] [-r] [-d] <path>\n" );
printf( " Get the locations of the path.\n" );
Expand Down Expand Up @@ -1571,13 +1575,14 @@ XRootDStatus PrintHelp( FileSystem *, Env *,
printf( " truncate <filename> <length>\n" );
printf( " Truncate a file.\n\n" );

printf( " prepare [-c] [-f] [-s] [-w] [-p priority] filenames\n" );
printf( " prepare [-c] [-f] [-s] [-w] [-p priority] [-a] filenames\n" );
printf( " Prepare one or more files for access.\n" );
printf( " -c co-locate staged files if possible\n" );
printf( " -f refresh file access time even if the location is known\n" );
printf( " -s stage the files to disk if they are not online\n" );
printf( " -w the files will be accessed for modification\n" );
printf( " -p priority of the request, 0 (lowest) - 3 (highest)\n\n" );
printf( " -p priority of the request, 0 (lowest) - 3 (highest)\n" );
printf( " -a abort stage request\n\n" );

printf( " cat [-o local file] file\n" );
printf( " Print contents of a file to stdout.\n" );
Expand Down
3 changes: 2 additions & 1 deletion src/XrdCl/XrdClFileSystem.hh
Expand Up @@ -176,8 +176,9 @@ namespace XrdCl
//!< the location is known
Stage = kXR_stage, //!< stage the file to disk if it is not
//!< online
WriteMode = kXR_wmode //!< the file will be accessed for
WriteMode = kXR_wmode, //!< the file will be accessed for
//!< modification
Cancel = kXR_cancel
};
};
XRDOUC_ENUM_OPERATORS( PrepareFlags::Flags )
Expand Down

0 comments on commit 501fbd5

Please sign in to comment.