cape.tar
: Semiautomatic folder archiving¶
This is a module for tarring and untarring folders automatically in combination
with changing directory into and out of the folder. This function works in
combination primarily with the cape.cfdx.report.Report
class when the
"Report"
> "Archive"
option is set to True
.
The primary functions and their actions are:
chdir_up()
: Leave a folder, archive it, and delete the folder
Starting from folder called
thisdir/
cd ..
tar -uf thisdir.tar thisdir
rm -r thisdir/
chdir_in()
: Go into a folder that may be archived
tar -xf thisdir.tar
cd thisdir/
- cape.tar.chdir_in(fdir: str)¶
Go into a folder that may be archived
- Call:
>>> tar.chdir_in(fdir)
- Inputs:
- fdir:
str
Name of folder
- fdir:
- Versions:
2015-03-07
@ddalle
: v1.0
- cape.tar.chdir_up()¶
Leave a folder, archive it, and delete the folder
- Call:
>>> tar.chdir_up()
- Versions:
2015-03-07
@ddalle
: v1.0
- cape.tar.tar(ftar, *a)¶
Untar an archive