trioverse.blogg.se

Filetools logo
Filetools logo





  1. FILETOOLS LOGO UPDATE
  2. FILETOOLS LOGO PATCH
  3. FILETOOLS LOGO CODE

pytree is used if the target path does not exist yet check_for_recursive_symlinks – If symlink arg is not given or False check for recursive symlinks first.dirs_exist_ok – boolean indicating whether it’s OK if the target directory already exists.target_path – path to copy the directory to.copy_dir ( path, target_path, force_in_dry_run=False, dirs_exist_ok=False, check_for_recursive_symlinks=True, **kwargs ) ¶Ĭopy a directory from specified location to specified location Parameters: kwargs – additional named arguments to pass down to copy_dirĮ.force_in_dry_run – force running the command during dry run.copy ( paths, target_path, force_in_dry_run=False, **kwargs ) ¶Ĭopy single file/directory or list of files and directories to specified location Parameters: convert_name ( name, upper=False ) ¶Ĭonverts name so it can be used as variable name. path – Path of file to compute checksum for.compute_checksum ( path, checksum_type='md5' ) ¶Ĭompute checksum of specified file. silent – be silent (don’t print anything to stdout)Į.testing – are we in testing mode? if so, don’t actually clean up anything.tempdir – path to temporary directory to clean up.cleanup ( logfile, tempdir, testing, silent=False ) ¶Ĭleanup the specified log file and the tmp directory, if desired. Signal handler, cleans up locks & exits with received signal number. clean_up_locks_signal_handler ( signum, frame ) ¶ clean_up_locks ( ) ¶Ĭlean up all still existing locks that were created in this session. (depending on –wait-on-lock configuration option). If it exists, either wait until it’s released, or raise an error check_lock ( lock_name ) ¶Ĭheck whether a lock with specified name already exists. change_dir ( path ) ¶Ĭhange to directory at specified location. calc_block_checksum ( path, algorithm ) ¶Ĭalculate a checksum of a file by reading it into blocks. strip_fn – strip specified trailing substring from filename of backupĮ.hidden – make backup hidden (leading dot in filename).backup_extension – extension to use for the backup file (can be empty or None).back_up_file ( src_file, backup_extension='bak', hidden=False, strip_fn=None ) ¶īacks up a file appending a backup extension and timestamp to it (if there is already an existing backup). on_missing_match – Define what to do when no match was found in the file.Ĭan be ‘error’ to raise an error, ‘warn’ to print a warning or ‘ignore’ to do nothingĮ.backup – create backup of original file with specified suffix (no backup if value evaluates to False).

filetools logo filetools logo

regex_subs – list of substitutions to apply, specified as (, ).

FILETOOLS LOGO PATCH

paths – list of paths to files to patch (or just a single filepath).apply_regex_substitutions ( paths, regex_subs, backup='.orig.eb', on_missing_match=None ) ¶Īpply specified list of regex substitutions. Raises EasyBuildError on any error and returns True on success. assume unified diff created with “diff -ru old new”

FILETOOLS LOGO CODE

apply_patch ( patch_file, dest, fn=None, copy=False, level=None, use_git_am=False, use_git=False ) ¶Īpply a patch to source code in directory dest (up to a maximum ratio specified by –max-fail-ratio-adjust-permissions configuration option)Īdd or remove (if add is False) permission_bits from all files (if onlydirs is False)Īnd directories (if onlyfiles is False) in path.

  • ignore_errors – ignore errors that occur when changing permissions.
  • relative – add/remove permissions relative to current permissions (if False, hard set specified permissions).
  • group_id – also change group ownership to group with this group ID.
  • recursive – change permissions recursively (only makes sense if path is a directory).
  • onlydirs – only change permissions on directories (not files).
  • onlyfiles – only change permissions on files (not directories).
  • add – add permissions relative to current permissions (only relevant if ‘relative’ is set to True).
  • adjust_permissions ( provided_path, permission_bits, add=True, onlyfiles=False, onlydirs=False, recursive=True, group_id=None, relative=True, ignore_errors=False, skip_symlinks=None ) ¶Ĭhange permissions for specified path, using specified permission bits Parameters:

    FILETOOLS LOGO UPDATE

    Return hex string of the checksum update ( data ) ¶Ĭalculates a new checksum using the old one and the new data. Match the interface of the hashlib module hexdigest ( ) ¶

    filetools logo

    Wrapper class for adler32 and crc32 checksums to Davide Vanzo (ACCRE, Vanderbilt University)ĭamian Alvarez (Forschungszentrum Juelich GmbH)Ĭlass.







    Filetools logo