|
| KAr (const TQString &filename) |
|
| KAr (TQIODevice *dev) |
|
virtual | ~KAr () |
|
TQString | fileName () |
|
virtual bool | prepareWriting (const TQString &name, const TQString &user, const TQString &group, uint size) |
|
virtual bool | doneWriting (uint size) |
|
virtual bool | writeDir (const TQString &name, const TQString &user, const TQString &group) |
|
virtual bool | open (int mode) |
|
virtual void | close () |
|
bool | closeSucceeded () const |
|
bool | isOpened () const |
|
int | mode () const |
|
TQIODevice * | device () const |
|
const KArchiveDirectory * | directory () const |
|
bool | addLocalFile (const TQString &fileName, const TQString &destName) |
|
bool | addLocalDirectory (const TQString &path, const TQString &destName) |
|
virtual bool | writeDir (const TQString &name, const TQString &user, const TQString &group)=0 |
|
bool | writeDir (const TQString &name, const TQString &user, const TQString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
bool | writeSymLink (const TQString &name, const TQString &target, const TQString &user, const TQString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
virtual bool | writeFile (const TQString &name, const TQString &user, const TQString &group, uint size, const char *data) |
|
bool | writeFile (const TQString &name, const TQString &user, const TQString &group, uint size, mode_t perm, time_t atime, time_t mtime, time_t ctime, const char *data) |
|
virtual bool | prepareWriting (const TQString &name, const TQString &user, const TQString &group, uint size)=0 |
|
bool | prepareWriting (const TQString &name, const TQString &user, const TQString &group, uint size, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
bool | writeData (const char *data, uint size) |
|
virtual bool | doneWriting (uint size)=0 |
|
|
virtual bool | openArchive (int mode) |
|
virtual bool | closeArchive () |
|
virtual void | virtual_hook (int id, void *data) |
|
| KArchive (TQIODevice *dev) |
|
virtual bool | openArchive (int mode)=0 |
|
virtual bool | closeArchive ()=0 |
|
virtual KArchiveDirectory * | rootDir () |
|
KArchiveDirectory * | findOrCreate (const TQString &path) |
|
void | setDevice (TQIODevice *dev) |
|
void | setRootDir (KArchiveDirectory *rootDir) |
|
virtual void | virtual_hook (int id, void *data) |
|
bool | prepareWriting_impl (const TQString &name, const TQString &user, const TQString &group, uint size, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
bool | writeFile_impl (const TQString &name, const TQString &user, const TQString &group, uint size, mode_t perm, time_t atime, time_t mtime, time_t ctime, const char *data) |
|
bool | writeDir_impl (const TQString &name, const TQString &user, const TQString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
bool | writeSymLink_impl (const TQString &name, const TQString &target, const TQString &user, const TQString &group, mode_t perm, time_t atime, time_t mtime, time_t ctime) |
|
bool | writeData_impl (const char *data, uint size) |
|
KAr is a class for reading archives in ar format.
Writing is not supported.
A class for reading ar archives.
- Author
- Laurence Anderson l.d.a.nosp@m.nder.nosp@m.son@w.nosp@m.arwi.nosp@m.ck.ac.nosp@m..uk
- Since
- 3.1
Definition at line 38 of file kar.h.
virtual bool KAr::prepareWriting |
( |
const TQString & |
name, |
|
|
const TQString & |
user, |
|
|
const TQString & |
group, |
|
|
uint |
size |
|
) |
| |
|
inlinevirtual |
Here's another way of writing a file into an archive: Call prepareWriting, then call writeData() as many times as wanted then call doneWriting( totalSize ).
For tar.gz files, you need to know the size before hand, since it is needed in the header. For zip files, size isn't used.
- Parameters
-
name | the name of the file |
user | the user that owns the file |
group | the group that owns the file |
size | the size of the file |
- Todo:
- TODO(BIC): make this a thin non-virtual wrapper around prepareWriting(name,user,group,size,perm,atime,mtime,ctime) or eliminate it.
Implements KArchive.
Definition at line 71 of file kar.h.