Interface COM.tolstoy.jconfig.DiskObject
All Packages Class Hierarchy This Package Previous Next Index
Interface COM.tolstoy.jconfig.DiskObject
- public interface DiskObject
- extends Object
- extends DumpInfo
The interfaces DiskVolume, DiskFile, and DiskAlias extend this interface, which contains
common methods for disk-related objects.
-
copyrightString
-
-
exists()
- Returns true if this object still exists, false otherwise.
-
getColorCoding()
- Returns the Mac-style color coding label for this object.
-
getContainer()
- Returns the DiskObject which contains this object.
-
getCreationDate()
- Returns the creation date.
-
getDisplayName()
- Returns the name of this object, as it would be displayed to the user.
-
getFile()
- Returns a copy of the File object associated with this object.
-
getFlags()
- Returns a set of binary flags associated with this object.
-
getGetFlagsMask()
- Returns a mask which indicates which bits returned by 'getFlags' are significant.
-
getIconBundle()
- Returns the icon bundle associated with this object.
-
getLastAccessDate()
- Returns the last access date.
-
getModificationDate()
- Returns the last modified date.
-
getName()
- Returns the name of this object.
-
iterate(DiskFilter, int, int)
- Enumerates the contents of this object.
-
setName(String)
- Sets the name of this object.
-
updateContainer()
- Sets the modification date of the container of this object to the current time.
copyrightString
public final static String copyrightString
getName
public abstract String getName()
- Returns the name of this object. If this object no longer exists or if an error occurs,
returns null.
setName
public abstract int setName(String newName)
- Sets the name of this object. Returns 0 if the name was set successfully, non-zero otherwise.
The name must be in quoted-printable form.
getDisplayName
public abstract String getDisplayName()
- Returns the name of this object, as it would be displayed to the user. Note that the display
name may be different from the name of this object. If this object no longer exists,
returns null.
getCreationDate
public abstract Date getCreationDate()
- Returns the creation date. Returns null if that information is not available, or if this object
no longer exists.
getLastAccessDate
public abstract Date getLastAccessDate()
- Returns the last access date. Returns null if that information is not available, or if this
object no longer exists.
getModificationDate
public abstract Date getModificationDate()
- Returns the last modified date. Returns null if that information is not available, or if this
object no longer exists.
getIconBundle
public abstract IconBundle getIconBundle()
- Returns the icon bundle associated with this object. Returns null if this object does not have
any associated icons, or if this object no longer exists.
getColorCoding
public abstract int getColorCoding()
- Returns the Mac-style color coding label for this object. Returns a number between 0 and 7;
0 signifies that there is no color coding.
getFlags
public abstract int getFlags()
- Returns a set of binary flags associated with this object. Use the 'getGetFlagsMask' method
to find out which bits of the returned value are significant.
getGetFlagsMask
public abstract int getGetFlagsMask()
- Returns a mask which indicates which bits returned by 'getFlags' are significant. For
instance, if bit 0 of the return value of this method is set, bit 0 of 'getFlags' contains
actual information, otherwise, this information is not available.
getFile
public abstract File getFile()
- Returns a copy of the File object associated with this object.
exists
public abstract boolean exists()
- Returns true if this object still exists, false otherwise.
iterate
public abstract int iterate(DiskFilter filter,
int flags,
int maxToIterate)
- Enumerates the contents of this object. If this object does not contain other objects, returns
-1. Other error codes may be returned. Returns 0 if no error occurs.
- Parameters:
- filter - a DiskFilter object, to which each of the contained items will be presented. The
DiskFilter returns a boolean; true means to continue, false means to stop.
- flags - indicates what type of objects should be ignored. If zero, all objects will be
presented to the filter. If you want to exclude various types of objects, OR together the
appropriate constants from the DiskFilter interface: kIgnoreHidden, kIgnoreFolders,
kIgnoreFiles, kIgnoreAliases, kIgnoreNameLocked.
- maxToIterate - the maximum number of files to present to the DiskFilter
getContainer
public abstract DiskObject getContainer() throws FileNotFoundException, DiskFileException
- Returns the DiskObject which contains this object. If there is no such object ( i.e., this is
a volume ), returns null.
updateContainer
public abstract int updateContainer()
- Sets the modification date of the container of this object to the current time. Use this method,
for instance, to inform the Finder that you've made changes to an object.
All Packages Class Hierarchy This Package Previous Next Index