org.kde.koala
Class KArchiveDirectory

java.lang.Object
  extended by org.kde.koala.KArchiveEntry
      extended by org.kde.koala.KArchiveDirectory
All Implemented Interfaces:
org.kde.qt.QtSupport

public class KArchiveDirectory
extends KArchiveEntry

Represents a directory entry in a KArchive.

See Also:
KArchive, KArchiveFile

Constructor Summary
protected KArchiveDirectory(java.lang.Class dummy)
           
  KArchiveDirectory(KArchive archive, java.lang.String name, int access, int date, java.lang.String user, java.lang.String group, java.lang.String symlink)
          Creates a new directory entry.
 
Method Summary
 void addEntry(KArchiveEntry arg1)
          Adds a new entry to the directory.
 void copyTo(java.lang.String dest)
           
 void copyTo(java.lang.String dest, boolean recursive)
          Extracts all entries in this archive directory to the directory dest.
 void dispose()
          Delete the wrapped C++ instance ahead of finalize()
 java.util.ArrayList entries()
          Returns a list of sub-entries.
 KArchiveEntry entry(java.lang.String name)
          Returns the entry with the given name.
protected  void finalize()
          Deletes the wrapped C++ instance
 boolean isDirectory()
          Checks whether this entry is a directory.
 boolean isDisposed()
          Has the wrapped C++ instance been deleted?
 
Methods inherited from class org.kde.koala.KArchiveEntry
archive, date, datetime, group, isFile, name, permissions, symlink, user
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KArchiveDirectory

protected KArchiveDirectory(java.lang.Class dummy)

KArchiveDirectory

public KArchiveDirectory(KArchive archive,
                         java.lang.String name,
                         int access,
                         int date,
                         java.lang.String user,
                         java.lang.String group,
                         java.lang.String symlink)
Creates a new directory entry.

Parameters:
archive - the entries archive
name - the name of the entry
access - the permissions in unix format
date - the date (in seconds since 1970)
user - the user that owns the entry
group - the group that owns the entry
symlink - the symlink, or null
Method Detail

entries

public java.util.ArrayList entries()
Returns a list of sub-entries.

Returns:
the names of all entries in this directory (filenames, no path).

entry

public KArchiveEntry entry(java.lang.String name)
Returns the entry with the given name.

Parameters:
name - may be "test1", "mydir/test3", "mydir/mysubdir/test3", etc.
Returns:
a pointer to the entry in the directory.

addEntry

public void addEntry(KArchiveEntry arg1)
Adds a new entry to the directory.


isDirectory

public boolean isDirectory()
Checks whether this entry is a directory.

Overrides:
isDirectory in class KArchiveEntry
Returns:
true, since this entry is a directory

copyTo

public void copyTo(java.lang.String dest,
                   boolean recursive)
Extracts all entries in this archive directory to the directory dest.

Parameters:
dest - the directory to extract to
recursive - if set to true, subdirectories are extracted as well

copyTo

public void copyTo(java.lang.String dest)

finalize

protected void finalize()
                 throws java.lang.InternalError
Deletes the wrapped C++ instance

Overrides:
finalize in class KArchiveEntry
Throws:
java.lang.InternalError

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

Overrides:
dispose in class KArchiveEntry

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

Overrides:
isDisposed in class KArchiveEntry