2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: tarstrm.h
|
2008-10-04 07:01:50 -04:00
|
|
|
// Purpose: interface of wxTar* classes
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
|
|
|
|
/** wxTarEntry::GetTypeFlag() values */
|
|
|
|
enum wxTarType
|
|
|
|
{
|
|
|
|
wxTAR_REGTYPE = '0', //!< regular file
|
|
|
|
wxTAR_LNKTYPE = '1', //!< hard link
|
|
|
|
wxTAR_SYMTYPE = '2', //!< symbolic link
|
|
|
|
wxTAR_CHRTYPE = '3', //!< character special
|
|
|
|
wxTAR_BLKTYPE = '4', //!< block special
|
|
|
|
wxTAR_DIRTYPE = '5', //!< directory
|
|
|
|
wxTAR_FIFOTYPE = '6', //!< named pipe
|
|
|
|
wxTAR_CONTTYPE = '7' //!< contiguous file
|
|
|
|
};
|
|
|
|
|
|
|
|
/** Archive Formats (use wxTAR_PAX, it's backward compatible) used by wxTarEntry */
|
|
|
|
enum wxTarFormat
|
|
|
|
{
|
|
|
|
wxTAR_USTAR, //!< POSIX.1-1990 tar format
|
|
|
|
wxTAR_PAX //!< POSIX.1-2001 tar format
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxTarInputStream
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Input stream for reading tar files.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
wxTarInputStream::GetNextEntry() returns a wxTarEntry object containing the
|
|
|
|
meta-data for the next entry in the tar (and gives away ownership).
|
|
|
|
Reading from the wxTarInputStream then returns the entry's data.
|
|
|
|
wxTarInputStream::Eof() becomes @true after an attempt has been made to read
|
|
|
|
past the end of the entry's data.
|
|
|
|
|
|
|
|
When there are no more entries, wxTarInputStream::GetNextEntry() returns @NULL
|
|
|
|
and sets wxTarInputStream::Eof().
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Tar entries are seekable if the parent stream is seekable. In practice this
|
|
|
|
usually means they are only seekable if the tar is stored as a local file and
|
|
|
|
is not compressed.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
2008-10-04 07:01:50 -04:00
|
|
|
@category{archive,streams}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
@see @ref overview_archive_byname
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxTarInputStream : public wxArchiveInputStream
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
2008-03-09 08:33:59 -04:00
|
|
|
Constructor. In a Unicode build the second parameter @a conv is
|
2008-10-04 07:01:50 -04:00
|
|
|
used to translate fields from the standard tar header into Unicode.
|
|
|
|
|
|
|
|
It has no effect on the stream's data. @a conv is only used for the standard
|
2008-03-08 08:52:38 -05:00
|
|
|
tar headers, any pax extended headers are always UTF-8 encoded.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
If the parent stream is passed as a pointer then the new filter stream
|
|
|
|
takes ownership of it. If it is passed by reference then it does not.
|
|
|
|
*/
|
|
|
|
wxTarInputStream(wxInputStream& stream,
|
|
|
|
wxMBConv& conv = wxConvLocal);
|
2008-03-08 09:43:31 -05:00
|
|
|
wxTarInputStream(wxInputStream* stream,
|
|
|
|
wxMBConv& conv = wxConvLocal);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Closes the current entry.
|
|
|
|
On a non-seekable stream reads to the end of the current entry first.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool CloseEntry();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Closes the current entry if one is open, then reads the meta-data for
|
2008-10-04 07:01:50 -04:00
|
|
|
the next entry and returns it in a wxTarEntry object, giving away ownership.
|
|
|
|
The stream is then open and can be read.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxTarEntry* GetNextEntry();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Closes the current entry if one is open, then opens the entry specified
|
2008-03-09 08:33:59 -04:00
|
|
|
by the @a entry object.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
|
|
|
@a entry should be from the same tar file, and the tar should be on a
|
|
|
|
seekable stream.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool OpenEntry(wxTarEntry& entry);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxTarClassFactory
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
Class factory for the tar archive format.
|
|
|
|
See the base class for details.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
2008-10-04 07:01:50 -04:00
|
|
|
@category{archive,streams}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
@see @ref overview_archive, @ref overview_archive_generic,
|
|
|
|
wxTarEntry, wxTarInputStream, wxTarOutputStream
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxTarClassFactory : public wxArchiveClassFactory
|
|
|
|
{
|
|
|
|
public:
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxTarOutputStream
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Output stream for writing tar files.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
wxTarOutputStream::PutNextEntry() is used to create a new entry in the output tar,
|
|
|
|
then the entry's data is written to the wxTarOutputStream.
|
|
|
|
Another call to wxTarOutputStream::PutNextEntry() closes the current entry
|
|
|
|
and begins the next.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
|
|
|
@category{streams}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
@see @ref overview_archive, wxTarEntry, wxTarInputStream
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxTarOutputStream : public wxArchiveOutputStream
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
If the parent stream is passed as a pointer then the new filter stream
|
|
|
|
takes ownership of it. If it is passed by reference then it does not.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
In a Unicode build the third parameter @a conv is used to translate the
|
2008-03-08 08:52:38 -05:00
|
|
|
headers fields into an 8-bit encoding. It has no effect on the stream's data.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
When the @a format is @e wxTAR_PAX, pax extended headers are generated
|
2008-03-08 08:52:38 -05:00
|
|
|
when any header field will not fit the standard tar header block or if it
|
|
|
|
uses any non-ascii characters.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Extended headers are stored as extra 'files' within the tar, and will be
|
|
|
|
extracted as such by any other tar program that does not understand them.
|
2008-03-09 08:33:59 -04:00
|
|
|
The @a conv parameter only affect the standard tar headers, the extended
|
2008-03-08 08:52:38 -05:00
|
|
|
headers are always UTF-8 encoded.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
|
|
|
When the @a format is @e wxTAR_USTAR, no extended headers are generated,
|
|
|
|
and instead a warning message is logged if any header field overflows.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
wxTarOutputStream(wxOutputStream& stream,
|
|
|
|
wxTarFormat format = wxTAR_PAX,
|
|
|
|
wxMBConv& conv = wxConvLocal);
|
2008-03-08 09:43:31 -05:00
|
|
|
wxTarOutputStream(wxOutputStream* stream,
|
|
|
|
wxTarFormat format = wxTAR_PAX,
|
|
|
|
wxMBConv& conv = wxConvLocal);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
The destructor calls Close() to finish writing the tar if it has
|
|
|
|
not been called already.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
virtual ~wxTarOutputStream();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Finishes writing the tar, returning @true if successful.
|
|
|
|
Called by the destructor if not called explicitly.
|
|
|
|
*/
|
|
|
|
bool Close();
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Close the current entry.
|
|
|
|
|
|
|
|
It is called implicitly whenever another new entry is created with
|
|
|
|
CopyEntry() or PutNextEntry(), or when the tar is closed.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool CloseEntry();
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
See wxArchiveOutputStream::CopyArchiveMetaData().
|
2008-03-08 08:52:38 -05:00
|
|
|
For the tar format this function does nothing.
|
|
|
|
*/
|
|
|
|
bool CopyArchiveMetaData(wxTarInputStream& s);
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Takes ownership of @a entry and uses it to create a new entry in the tar.
|
|
|
|
@a entry is then opened in @a inputStream and its contents copied to this stream.
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
For some other archive formats CopyEntry() is much more efficient than
|
|
|
|
transferring the data using Read() and Write() since it will copy them
|
2008-10-04 07:01:50 -04:00
|
|
|
without decompressing and recompressing them.
|
|
|
|
For tar however it makes no difference.
|
|
|
|
|
2008-03-09 08:33:59 -04:00
|
|
|
For tars on seekable streams, @a entry must be from the same tar file
|
2008-10-04 07:01:50 -04:00
|
|
|
as @a inputStream. For non-seekable streams, @a entry must also be the
|
|
|
|
last thing read from @a inputStream.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool CopyEntry(wxTarEntry* entry, wxTarInputStream& inputStream);
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
The tar is zero padded to round its size up to @e BlockingFactor * 512 bytes.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
|
|
|
The blocking factor defaults to 10 for @e wxTAR_PAX and 20 for @e wxTAR_USTAR
|
|
|
|
(see wxTarOutputStream()), as specified in the POSIX standards.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
int GetBlockingFactor() const;
|
|
|
|
void SetBlockingFactor(int factor);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Create a new directory entry (see wxArchiveEntry::IsDir()) with the given
|
|
|
|
name and timestamp.
|
|
|
|
|
|
|
|
PutNextEntry() can also be used to create directory entries, by supplying
|
|
|
|
a name with a trailing path separator.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
bool PutNextDirEntry(const wxString& name, const wxDateTime& dt = wxDateTime::Now());
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Takes ownership of entry and uses it to create a new entry in the tar.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
bool PutNextEntry(wxTarEntry* entry);
|
2008-10-04 07:01:50 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
Create a new entry with the given name, timestamp and size.
|
|
|
|
*/
|
|
|
|
bool PutNextEntry(const wxString& name, const wxDateTime& dt = wxDateTime::Now(),
|
|
|
|
wxFileOffset size = wxInvalidOffset);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxTarEntry
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
Holds the meta-data for an entry in a tar.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
@section tarentry_fields Field availability
|
|
|
|
|
|
|
|
The tar format stores all the meta-data for an entry ahead of its data,
|
|
|
|
therefore GetNextEntry() always returns a fully populated wxTarEntry object,
|
|
|
|
both when reading from seekable and non-seekable streams.
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxbase}
|
2008-10-04 07:01:50 -04:00
|
|
|
@category{archive,streams}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
@see @ref overview_archive, wxTarInputStream, wxTarOutputStream
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxTarEntry : public wxArchiveEntry
|
|
|
|
{
|
|
|
|
public:
|
2008-10-04 07:01:50 -04:00
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
The tar archive format stores the entry's size ahead of the entry's data.
|
|
|
|
Therefore when creating an archive on a non-seekable stream it is necessary
|
|
|
|
to supply the correct size when each entry is created.
|
|
|
|
*/
|
|
|
|
wxTarEntry(const wxString& name = wxEmptyString,
|
|
|
|
const wxDateTime& dt = wxDateTime::Now(),
|
|
|
|
wxFileOffset size = wxInvalidOffset);
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
Copy constructor.
|
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
wxTarEntry(const wxTarEntry& entry);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Gets/sets the entry's access time stamp.
|
|
|
|
See also wxArchiveEntry::GetDateTime() and wxArchiveEntry::SetDateTime().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
wxDateTime GetAccessTime() const;
|
|
|
|
void SetAccessTime(const wxDateTime& dt);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
The entry's creation time stamp.
|
|
|
|
See also wxArchiveEntry::GetDateTime() and wxArchiveEntry::SetDateTime().
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
wxDateTime GetCreateTime() const;
|
|
|
|
void SetCreateTime(const wxDateTime& dt);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
OS specific IDs defining a device; these are only meaningful when
|
|
|
|
wxTarEntry::GetTypeFlag() is @e wxTAR_CHRTYPE or @e wxTAR_BLKTYPE.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
int GetDevMajor() const;
|
|
|
|
int GetDevMinor() const;
|
|
|
|
void SetDevMajor(int dev);
|
2008-03-08 09:43:31 -05:00
|
|
|
void SetDevMinor(int dev);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
The user ID and group ID that has permissions (see wxTarEntry::GetMode())
|
|
|
|
over this entry.
|
|
|
|
|
|
|
|
These values aren't usually useful unless the file will only be
|
|
|
|
restored to the same system it originated from.
|
|
|
|
wxTarEntry::GetGroupName() and wxTarEntry::GetUserName() can be used instead.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
int GetGroupId() const;
|
|
|
|
int GetUserId() const;
|
|
|
|
void SetGroupId(int id);
|
2008-03-08 09:43:31 -05:00
|
|
|
void SetUserId(int id);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
The names of the user and group that has permissions (see wxTarEntry::GetMode())
|
2008-03-08 08:52:38 -05:00
|
|
|
over this entry. These are not present in very old tars.
|
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
wxString GetGroupName() const;
|
|
|
|
wxString GetUserName() const;
|
|
|
|
void SetGroupName(const wxString& group);
|
2008-03-08 09:43:31 -05:00
|
|
|
void SetUserName(const wxString& user);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
The filename of a previous entry in the tar that this entry is a link to.
|
2008-10-04 07:01:50 -04:00
|
|
|
Only meaningful when wxTarEntry::GetTypeFlag() is set to @e wxTAR_LNKTYPE
|
|
|
|
or @e wxTAR_SYMTYPE.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
wxString GetLinkName() const;
|
|
|
|
void SetLinkName(const wxString& link);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
UNIX permission bits for this entry.
|
|
|
|
Giving read, write and execute permissions to the file's user and group
|
|
|
|
(see GetGroupName() and GetUserName()) and to others.
|
|
|
|
|
|
|
|
The integer is one or more ::wxPosixPermissions flags OR-combined.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
int GetMode() const;
|
|
|
|
void SetMode(int mode);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
|
|
|
The size of the entry's data in bytes.
|
2008-10-04 07:01:50 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
The tar archive format stores the entry's size ahead of the entry's data.
|
|
|
|
Therefore when creating an archive on a non-seekable stream it is necessary to
|
2008-10-04 07:01:50 -04:00
|
|
|
supply the correct size when each entry is created.
|
|
|
|
|
|
|
|
For seekable streams this is not necessary as wxTarOutputStream will attempt
|
2008-03-08 08:52:38 -05:00
|
|
|
to seek back and fix the entry's header when the entry is closed, though it is
|
|
|
|
still more efficient if the size is given beforehand.
|
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
void SetSize(wxFileOffset size);
|
2008-03-09 12:24:26 -04:00
|
|
|
wxFileOffset GetSize() const;
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
|
|
|
//@{
|
|
|
|
/**
|
2008-10-04 07:01:50 -04:00
|
|
|
Returns/Sets the type of the entry as a ::wxTarType value.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
When creating archives use only one of ::wxTarType values.
|
|
|
|
When reading archives, GetTypeFlag() may return a value which does not
|
|
|
|
match any value of ::wxTarType; in this case the returned value should be
|
|
|
|
treated as @e wxTAR_REGTYPE.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
int GetTypeFlag() const;
|
|
|
|
void SetTypeFlag(int type);
|
2008-03-08 08:52:38 -05:00
|
|
|
//@}
|
|
|
|
|
2008-10-04 07:01:50 -04:00
|
|
|
/**
|
|
|
|
Returns the entry's filename in the internal format used within the archive.
|
|
|
|
|
|
|
|
The name can include directory components, i.e. it can be a full path.
|
|
|
|
The names of directory entries are returned without any trailing path separator.
|
|
|
|
This gives a canonical name that can be used in comparisons.
|
|
|
|
*/
|
|
|
|
wxString GetInternalName() const;
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
A static member that translates a filename into the internal format used
|
2008-10-04 07:01:50 -04:00
|
|
|
within the archive.
|
|
|
|
|
|
|
|
If the third parameter is provided, the bool pointed to is set to indicate
|
|
|
|
whether the name looks like a directory name (i.e. has a trailing path separator).
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-10-04 07:01:50 -04:00
|
|
|
static wxString GetInternalName(const wxString& name,
|
2008-03-09 12:24:26 -04:00
|
|
|
wxPathFormat format = wxPATH_NATIVE,
|
|
|
|
bool* pIsDir = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Assignment operator.
|
|
|
|
*/
|
|
|
|
wxTarEntry& operator operator=(const wxTarEntry& entry);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|