XRootDPath¶
-
class
hep_rfm.
XRootDPath
(path)[source]¶ Bases:
hep_rfm.protocols.RemotePath
Represent a path to be handled using XROOTD protocol.
Parameters: path (str) – path to save, pointing to a file. Attributes Summary
pid
Methods Summary
copy
(target)Copy the source file to the target using this protocol. join_path
(prefix, path)Policy to merge a prefix and a path in this protocol. mkdirs
()Make directories to the file path within this protocol. split_path
()Split the remote path in the server specifications and path in the server. with_modifiers
([modifiers])Return an instance of this class after applying modifications. Attributes Documentation
-
pid
= 'xrootd'¶
Methods Documentation
-
copy
(target)[source]¶ Copy the source file to the target using this protocol. The target must be accessible.
Parameters: - source (ProtocolPath) – source file to copy.
- target (ProtocolPath) – where to copy the file.
Raises: CopyFileError – if a problem appears while copying the file.
-
static
join_path
(prefix, path)[source]¶ Policy to merge a prefix and a path in this protocol.
Parameters: Returns: result of joining the prefix and the path for this protocol.
Return type:
-
mkdirs
()[source]¶ Make directories to the file path within this protocol.
Raises: MakeDirsError – if an error occurs while creating directories.
-
split_path
()[source]¶ Split the remote path in the server specifications and path in the server.
Returns: server specifications and path in the server. Return type: str, str
-
with_modifiers
(modifiers=None)[source]¶ Return an instance of this class after applying modifications. The input dictionary “modifiers” might contain information about the user-name for the host in the stored path. The allowed keys for this dictionary are: - “xrootd_servers”: list containing the XRootD servers accessible from the place where the operation is being done. If the path stored in this class has a host that coincides with any of those here specified, it will return a
hep_rfm.LocalPath
instance.Parameters: modifiers (dict) – information to modify the path of this class. Returns: modified instance if a modification is applied. Otherwise same instance. Return type: ProtocolPath
-