ATLAS Offline Software
|
Classes | |
class | AccessType |
class | Tee |
Functions | |
def | retry_function_time (func, args, retryException, retryMaxTime=defaultRetryMaxTime, retryStartTime=defaultRetryMaxTime) |
def | retry_file_access (func, args, retryException=OSError, retryMaxTime=defaultRetryMaxTime, retryStartTime=defaultRetryMaxTime) |
def | get_access_type (filename) |
def | exists (filename) |
def | getsize (filename) |
def | getmtime (filename) |
def | listdir (filename) |
def | stat (filename) |
def | lstat (filename) |
def | access (filename, mode) |
def | remove (filename) |
def | exists_suffix (filename, suffixRE) |
def | exists_suffix_number (filename) |
def | mode_string (filename) |
def | mode_to_string (mode) |
Variables | |
__doc__ | |
__all__ | |
defaultRetryMaxTime | |
defaultRetryStartTime | |
IO_LOCAL | |
IO_RFIO | |
IO_CASTOR | |
IO_XROOTD | |
IO_LFN | |
_accessTypes | |
def python.fileutil.access | ( | filename, | |
mode | |||
) |
Definition at line 145 of file fileutil.py.
def python.fileutil.exists | ( | filename | ) |
Definition at line 115 of file fileutil.py.
def python.fileutil.exists_suffix | ( | filename, | |
suffixRE | |||
) |
Test if a file exists in the same directory as <filename>, with the same name, but with an additional suffix given as a regular expression in <suffixRE>. It returns a list of all matching suffices, or an empty list if no matching filename+suffix was found.
Definition at line 160 of file fileutil.py.
def python.fileutil.exists_suffix_number | ( | filename | ) |
Test if a file exists in the same directory as <filename>, with the same name, but a non-negative integer added at the end of the name. It returns the filename with the highest number added, or None if no such file exists.
Definition at line 178 of file fileutil.py.
def python.fileutil.get_access_type | ( | filename | ) |
Definition at line 109 of file fileutil.py.
def python.fileutil.getmtime | ( | filename | ) |
Definition at line 125 of file fileutil.py.
def python.fileutil.getsize | ( | filename | ) |
Definition at line 120 of file fileutil.py.
def python.fileutil.listdir | ( | filename | ) |
Definition at line 130 of file fileutil.py.
def python.fileutil.lstat | ( | filename | ) |
Definition at line 140 of file fileutil.py.
def python.fileutil.mode_string | ( | filename | ) |
Definition at line 194 of file fileutil.py.
def python.fileutil.mode_to_string | ( | mode | ) |
Return the unix like string corresponding to the file access mode (rwxd etc)
Definition at line 198 of file fileutil.py.
def python.fileutil.remove | ( | filename | ) |
Remove file <filename> if it exists. Only supported for local files.
Definition at line 150 of file fileutil.py.
def python.fileutil.retry_file_access | ( | func, | |
args, | |||
retryException = OSError , |
|||
retryMaxTime = defaultRetryMaxTime , |
|||
retryStartTime = defaultRetryMaxTime |
|||
) |
Definition at line 47 of file fileutil.py.
def python.fileutil.retry_function_time | ( | func, | |
args, | |||
retryException, | |||
retryMaxTime = defaultRetryMaxTime , |
|||
retryStartTime = defaultRetryMaxTime |
|||
) |
Call function several times if it throws a <retryException>. It will wait an increasing amount of time in between tries. First waiting time is <retryStartTime>, which is increased by a factor of 2 for each retry. It will give up and raise the original exception if it still fails after a total retry time of <retryMaxTime>. <func>: function to be called <args>: tuple with the function arguments, or the single function argument
Definition at line 14 of file fileutil.py.
def python.fileutil.stat | ( | filename | ) |
Definition at line 135 of file fileutil.py.
|
private |
Definition at line 9 of file fileutil.py.
|
private |
Definition at line 7 of file fileutil.py.
|
private |
Definition at line 76 of file fileutil.py.
python.fileutil.defaultRetryMaxTime |
Definition at line 11 of file fileutil.py.
python.fileutil.defaultRetryStartTime |
Definition at line 12 of file fileutil.py.
python.fileutil.IO_CASTOR |
Definition at line 73 of file fileutil.py.
python.fileutil.IO_LFN |
Definition at line 75 of file fileutil.py.
python.fileutil.IO_LOCAL |
Definition at line 71 of file fileutil.py.
python.fileutil.IO_RFIO |
Definition at line 72 of file fileutil.py.
python.fileutil.IO_XROOTD |
Definition at line 74 of file fileutil.py.