include("import") func doOpen(_data) // TODO fvar(_amode, _omode, _cmode) need_tarfile() if (Mode == 0) _amode = ':' end if (Mode == 1) _amode = '|' end if (OpenMode == 0) _omode = 'r' end if (OpenMode == 1) _omode = 'w' end if (OpenMode == 2) _omode = 'a' end if (Compression == 'none') _cmode = '' else _cmode = Compression end println(tFile && ' = tarfile.open(' && ArcName && ', ' && str( _omode + _amode + _cmode ) && ')') end func doAdd(_data) need_tarfile() println(tFile && '.add(' && FileName && ')') end func doExtract(_data) fvar(s) need_tarfile() // TODO s = tFile && '.extract(' && FileName if (linked(Path)) s = s && ', ' && Path end s = s && ')' println(s) end func doExtractAll(_data) fvar(s) need_tarfile() s = tFile && '.extractall(' if (linked(Path)) s = s && Path end s = s && ')' println(s) end func doClose(_data) need_tarfile() // TODO println(tFile && '.close()') end func Names(_data) need_tarfile() return (tFile && '.getnames()') end