Main Page Cookbook/Overview ImageMeister the jcprops file Licensing Binary Installation & Configuration [ Win · Mac · Nix ] Changes Public API Source Code Main Page Java [ Common · Win · Mac · Nix ] Native Code [ Common · Win · Mac · Nix ] Manifest Native Code Overviews [ Common · Win · Mac · Nix · Strings ] Macros [ General · Native Macros ] Walkthroughs [ Java only · Java and native ] Building [ Win · Mac · Nix ] Distribution Issues

    All Packages  This Package  Class Hierarchy  Class Search  Index

Interface com.jconfig.DiskObject

Summary

    public interface  DiskObject
         extends com.jconfig.DumpInfo
    {
              // Fields 3
         public static final int DO_CREATEDIR;
         public static final int DO_CREATEFILE;
         public static final String copyrightString;

              // Methods 18
         public abstract DiskObject createObject(String, int, int);
         public abstract boolean exists();
         public abstract int getColorCoding();
         public abstract DiskObject getContainer() throws FileNotFoundException, DiskFileException;
         public abstract DateBundle getDateBundle();
         public abstract String getDisplayName();
         public abstract File getFile();
         public abstract FileSystem getFileSystem();
         public abstract int getFlags();
         public abstract int getGetFlagsMask();
         public abstract IconBundle getIconBundle();
         public abstract String getName();
         public abstract int getSetFlagsMask();
         public abstract int iterate(DiskFilter, int, int);
         public abstract void setDateBundle(DateBundle);
         public abstract void setFlags(int, int);
         public abstract int setName(String);
         public abstract int updateContainer();
    }

The interfaces DiskVolume, DiskFile, and DiskAlias extend this interface, which contains common methods for disk-related objects.

Author:
  Copyright (c) 1997,1998,1999,2000 Samizdat Productions. All Rights Reserved.

Cross Reference

Extended By:
  DiskFile, DiskVolume

Returned By:
  Many

Fields

### · copyrightString | Summary | Top

       public static final String copyrightString

### · DO_CREATEFILE | Summary | Top

       public static final int DO_CREATEFILE

> See the 'type' argument of the 'createObject() method.

### · DO_CREATEDIR | Summary | Top

       public static final int DO_CREATEDIR

> See the 'type' argument of the 'createObject() method.

Methods

### · getName | Summary | Top

       public abstract String getName()

> Returns the name of this object. If this object no longer exists or if an error occurs, returns null.

### · setName | Summary | Top

       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 | Summary | Top

       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.

### · getDateBundle | Summary | Top

       public abstract DateBundle getDateBundle()

> Returns a DateBundle containing zero or more of the dates associated with this object: the creation date, modification date, backup date, and access date. Use this instead of the following methods. Any or all of the dates in the DateBundle may be null if this object no longer exists, of if it is not possible to determine this information. This method can return null in those cases as well.

### · setDateBundle | Summary | Top

       public abstract void setDateBundle(DateBundle newDates)

> Sets the set of dates associated with this file.

> Parameter | Description
> newDates | if one or more of the dates in this bundle are null, they will not be changed.

### · getIconBundle | Summary | Top

       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 | Summary | Top

       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 | Summary | Top

       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 | Summary | Top

       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.

### · setFlags | Summary | Top

       public abstract void setFlags(int whichFlags,
                                     int flags)

> Sets the binary flags associated with this object. Use the 'getSetFlagsMask' method to find out which bits can be set.

> Parameter | Description
> whichFlags | a mask which indicates which bits in 'flags' will be set or reset For instance, if whichFlags is 0011, and flags is 0101, and the rightmost digit in the preceding numbers is bit #0, then, only bits #0 and #1 will be changed; bit #0 (indicated by the rightmost digit of whichFlags being 1) will be changed to 1 (the rightmost value in flags), and bit #1 will be changed to 0. All the other flags will not be changed, because only bits #0 and bits #1 are set in the mask.
> flags | contains the new values of the bits indicated by the whichFlags mask

> Throws: OSException
>   if an OS error occurs

### · getSetFlagsMask | Summary | Top

       public abstract int getSetFlagsMask()

> Returns a mask which indicates which bits can be set by 'setFlags'. For instance, if bit 0 of the return value of this method is set, bit 0 of the argument to 'setFlags' can be set.

> Throws: OSException
>   if an OS error occurs

### · getFile | Summary | Top

       public abstract File getFile()

> Returns a copy of the File object associated with this object.

### · exists | Summary | Top

       public abstract boolean exists()

> Returns true if this object still exists, false otherwise.

### · iterate | Summary | Top

       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.

> Parameter | Description
> 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 | Summary | Top

       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.

### · getFileSystem | Summary | Top

       public abstract FileSystem getFileSystem()

> Returns the FileSystem which contains this object. If that information cannot be determined, returns null.

### · updateContainer | Summary | Top

       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.

### · createObject | Summary | Top

       public abstract DiskObject createObject(String name,
                                               int type,
                                               int flags)

> Used to create a file, folder or other object which will be contained by this DiskObject. Returns the new DiskObject, or null if the object could not be created.

> Parameter | Description
> name | the name of the new object
> type | either 'DO_CREATEFILE' or 'DO_CREATEDIR'
> flags | reserved; set to 0 The following logic is used to create the object:
>     if type == DO_CREATEDIR
>     	if an object with that name already exists
>     		if it's a folder
>     			return a DiskObject representing that folder
>     		else
>     			return null
>     	else
>     		create a new folder, and return a DiskObject representing the new folder
>     else if type == DO_CREATEFILE
>     	if an object with that name already exists
>     		if it's a file
>     			return a DiskObject representing that file
>     		else
>     			return null
>     	else
>     		create a new, empty file, and return a DiskObject representing the new file

    All Packages  This Package  Class Hierarchy  Class Search  Index

Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7