/usr/lib/python3/dist-packages/landscape/lib/__pycache__
NameSizeModeActions
amp.cpython-310.pyc217830644editdlrm
backoff.cpython-310.pyc21370644editdlrm
base64.cpython-310.pyc3330644editdlrm
bootstrap.cpython-310.pyc22770644editdlrm
bpickle.cpython-310.pyc66580644editdlrm
cli.cpython-310.pyc5810644editdlrm
cloud.cpython-310.pyc18610644editdlrm
compat.cpython-310.pyc6060644editdlrm
config.cpython-310.pyc102180644editdlrm
disk.cpython-310.pyc40800644editdlrm
encoding.cpython-310.pyc7590644editdlrm
fd.cpython-310.pyc9510644editdlrm
fetch.cpython-310.pyc72350644editdlrm
format.cpython-310.pyc8920644editdlrm
fs.cpython-310.pyc35930644editdlrm
gpg.cpython-310.pyc21700644editdlrm
hashlib.cpython-310.pyc4080644editdlrm
jiffies.cpython-310.pyc13520644editdlrm
juju.cpython-310.pyc8070644editdlrm
lock.cpython-310.pyc10650644editdlrm
log.cpython-310.pyc6710644editdlrm
logging.cpython-310.pyc23660644editdlrm
message.cpython-310.pyc21270644editdlrm
monitor.cpython-310.pyc72000644editdlrm
network.cpython-310.pyc90150644editdlrm
os_release.cpython-310.pyc12490644editdlrm
persist.cpython-310.pyc177870644editdlrm
plugin.cpython-310.pyc25650644editdlrm
process.cpython-310.pyc43830644editdlrm
reactor.cpython-310.pyc101080644editdlrm
schema.cpython-310.pyc71550644editdlrm
scriptcontent.cpython-310.pyc6740644editdlrm
sequenceranges.cpython-310.pyc49200644editdlrm
store.cpython-310.pyc12200644editdlrm
sysstats.cpython-310.pyc77650644editdlrm
tag.cpython-310.pyc8790644editdlrm
testing.cpython-310.pyc261940644editdlrm
timestamp.cpython-310.pyc4360644editdlrm
twisted_util.cpython-310.pyc47360644editdlrm
user.cpython-310.pyc9080644editdlrm
versioning.cpython-310.pyc16480644editdlrm
vm_info.cpython-310.pyc28240644editdlrm
warning.cpython-310.pyc6150644editdlrm
__init__.cpython-310.pyc3520644editdlrm
Edit: /usr/lib/python3/dist-packages/landscape/lib/__pycache__/fs.cpython-310.pyc (3593B)
o c1@sjdZddlZddlZddlmZddZddZdd Zd d Zdd d Z dddZ e Z eZ dddZ dS)zFile-system utilsN)longcCt||ddS)zCreate a file with the given content. The content is encoded with utf-8 before writing. @param path: The path to the file. @param content: The content to be written in the file. utf-8N)create_binary_fileencodepathcontentr 2/usr/lib/python3/dist-packages/landscape/lib/fs.pycreate_text_file sr cC:t|d}||WddS1swYdS)zCreate a file with the given binary content. @param path: The path to the file. @param content: The content to be written in the file. wbNopenwriterr fdr r r rs  "rcCr)aAppend a file with the given content. The file is created, if it doesn't exist already. The content is utf-8 encoded before it is written. @param path: The path to the file. @param content: The content to be written in the file at the end. rN)append_binary_filerrr r r append_text_files rcCr )zAppend a file with the given binary content. The file is created, if it doesn't exist already. @param path: The path to the file. @param content: The content to be written in the file at the end. abNrrr r r r+s  "rcCsRt||durdn|d}|dd}|dur|S|dkr#|d|S||dS)aReturn the content of the given file as string. @param path: The path to the file. @param limit: An optional read limit. If positive, read up to that number of characters from the beginning of the file. If negative, read up to that number of bytes from the end of the file. @return content: The content of the file string, possibly trimmed to C{limit} characters. Nrreplacer)read_binary_filedecode)rlimitr r r r read_text_file7s   rcCst|d1}|dur+tj|t|kr+|dkr$||WdS||tj|WdS1s9wYdS)aReturn the content of the given file as bytes. @param path: The path to the file. @param limit: An optional read limit. If positive, read up to that number of bytes from the beginning of the file. If negative, read up to that number of bytes from the end of the file. @return content: The content of the file as bytes, possibly trimmed to C{limit}. rbNr)rosrgetsizeabsreadseekSEEK_END)rrrr r r rRs $rcCsDt|d|durtt|}||f}nd}t||dS)zTouch a file, creating it if it doesn't exist. @param path: the path to the file to be touched. @param offset_seconds: a signed integer number of seconds to offset the atime and mtime of the file from the current time. rN)rclosertimerutime)roffset_seconds offset_time touch_timer r r touch_filejs  r*)N)__doc__rr%twisted.python.compatrr rrrrr read_file create_filer*r r r r s