Package config_common :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

Functions [hide private]
 
normalize_path(path)
os.path.normpath does not remove path separator duplicates at the beginning of the path
source code
 
join_path(*args) source code
 
path_full_split(path)
Given a path, it fully splits it into constituent path components (as opposed to os.path.split which splits it into trailing component and preceeding path
source code
 
copyfile_p(src, dst)
Simple util function, copies src path to dst path, making directories as necessary.
source code
 
mkdir_p(path, mode=None, symlinks=None, allfiles=None)
Similar to 'mkdir -p' -- makes all directories necessary to ensure the 'path' is a directory, and return the list of directories that were made as a result
source code
 
rmdir_p(path, stoppath)
if rmdir had a -p option, this would be it.
source code
 
rm_trailing_slash(slashstring) source code
 
getContentChecksum(checksum_type, contents) source code
 
sha256_file(filename) source code
 
parse_url(server_url, scheme='https') source code
 
unparse_url(url_tuple) source code
 
get_home_dir() source code
Variables [hide private]
  hashlib_has_usedforsecurity = True
  _normpath_re = re.compile(r'^(/)+')
  __package__ = 'config_common'
Function Details [hide private]

copyfile_p(src, dst)

source code 

Simple util function, copies src path to dst path, making directories as necessary. File permissions are not preserved.

rmdir_p(path, stoppath)

source code 

if rmdir had a -p option, this would be it. remove dir and up until empty dir is hit, or stoppath is reached

path and stoppath have to be absolute paths