ewe.io
Class EweFile.EweEntryFile

java.lang.Object
  extended byewe.io.FileSys
      extended byewe.io.FileBase
          extended byewe.io.File
              extended byewe.io.FileAdapter
                  extended byewe.io.EweFile.EweEntryFile
All Implemented Interfaces:
FilePermissions, Streamable, Textable
Enclosing class:
EweFile

public static class EweFile.EweEntryFile
extends FileAdapter


Field Summary
 EweFile eweFile
           
 String eweFileName
           
 EweFile.EweEntry myEntry
           
 EweFile.EweEntry root
           
 boolean simulateCanWrite
           
 
Fields inherited from class ewe.io.FileBase
ClosedFolderIcon, CREATE, DriveIcon, FileIcon, FLAG_CASE_SENSITIVE, FLAG_FILE_SYSTEM_IS_READ_ONLY, FLAG_READ_ONLY, FLAG_SLOW_ACCESS, FLAG_SLOW_CHILD_COUNT, FLAG_SLOW_LIST, INFO_DETAIL_NAMES, INFO_DETAIL_WIDTHS, INFO_DETAILS, INFO_DEVICE_ICON, INFO_DEVICE_NAME, INFO_FILE_TIMES, INFO_FLAGS, INFO_FREE_DRIVE_SPACE, INFO_GROUP, INFO_ICON, INFO_ICON_LARGE, INFO_ICON_MEDIUM, INFO_ICON_SMALL, INFO_LINK_DESTINATION, INFO_OWNER, INFO_PROGRAM_DIRECTORY, INFO_ROOT_LIST, INFO_SYSTEM_TYPE, INFO_TEMPORARY_DIRECTORY, INFO_TOOL_TIP, INFO_TOTAL_DRIVE_SPACE, LIST_ALWAYS_INCLUDE_DIRECTORIES, LIST_BY_DATE, LIST_BY_SIZE, LIST_BY_TYPE, LIST_CHECK_FOR_ANY_MATCHING_CHILDREN, LIST_DESCENDING, LIST_DIRECTORIES_LAST, LIST_DIRECTORIES_ONLY, LIST_DONT_SORT, LIST_FILES_ONLY, LIST_IGNORE_DIRECTORY_STATUS, name, OpenFolderIcon, PageIcon, pathSeparator, pathSeparatorChar, READ_ONLY, READ_WRITE, separator, separatorChar, WRITE_ONLY
 
Fields inherited from class ewe.io.FileSys
DOS_SYSTEM, MEMORY_SYSTEM, PALM_SYSTEM, UNIX_SYSTEM
 
Fields inherited from interface ewe.io.FilePermissions
ALL_DOS_FLAGS, ALL_UNIX_PERMISSIONS, FLAG_ARCHIVE, FLAG_HIDDEN, FLAG_READONLY, FLAG_ROM, FLAG_ROMMODULE, FLAG_SYSTEM, GROUP_EXECUTE, GROUP_READ, GROUP_WRITE, OTHER_EXECUTE, OTHER_READ, OTHER_WRITE, OWNER_EXECUTE, OWNER_READ, OWNER_WRITE
 
Constructor Summary
EweFile.EweEntryFile(EweFile ef)
          Create an EweEntryFile for a particular EweFile.
EweFile.EweEntryFile(EweFile ef, Handle h)
          Create an EweEntryFile for a particular EweFile.
 
Method Summary
protected  void endFind(int search)
          This tells the File to free all resources associated with the find given the search ID returned by startFind().
 boolean exists()
          Returns true if the file exists and false otherwise.
protected  Object findNext(int search)
          This will find the next file in sequence given the search ID returned by startFind().
 Object getInfo(int value, Object source, Object resultDestination, int options)
          This method is used to get extended information about the File or the File system in general.
 int getLength()
          Returns the length of the file in bytes.
 File getNew(File parent, String file)
          Get a new File object given the directory and new path.
protected  void getSetModified(Time time, boolean doGet)
          This gets/sets the modified time of the file.
 boolean isDirectory()
          Returns true if the file is a directory and false otherwise.
 boolean isValid()
           
 void set(File parent, String file)
          This is used to tell the File to represent a different File entity.
protected  int startFind(String mask)
          This is used as the start point for listing.
 Stream toReadableStream()
          Create and return a Stream to use for reading from the File.
 
Methods inherited from class ewe.io.FileAdapter
createDir, delete, doList, getFullPath, getNewInstance, getSetPermissionsAndFlags, listFiles, move, setFullPathName, setInfo, toRandomAccessStream
 
Methods inherited from class ewe.io.File
deleteOnExit, executeFileChooser, getFileChooserClass, length, nativeGetInfo, nativeSetInfo, setFileChooserClass
 
Methods inherited from class ewe.io.FileBase
canRead, canWrite, changePermissionsAndFlags, convertMode, createTempFile, createTempFile, equals, filePathsAreEqual, fixupPath, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getChild, getCreationName, getDrivePath, getDrivePath, getFileExt, getFileExt, getFlags, getIcon, getInfo, getInputStream, getModified, getName, getNew, getNewFile, getNewFile, getNewFile, getOutputStream, getParent, getParentFile, getPath, getPermissionsAndFlags, getProgramDirectory, getPropertiesString, getRandomAccessStream, getText, getTrueChild, getTrueParent, hashCode, isFile, isHidden, isSameFileSystem, isSameVolume, lastModified, list, list, list, listMultiple, listRoots, makePath, makePath, mkdir, mkdirs, refresh, removeTrailingSlash, rename, renameTo, setInfo, setLastModified, setModified, setText, toStream, toString, toSystemDependantPath, toWritableStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass
 

Field Detail

root

public EweFile.EweEntry root

myEntry

public EweFile.EweEntry myEntry

eweFile

public EweFile eweFile

eweFileName

public String eweFileName

simulateCanWrite

public boolean simulateCanWrite
Constructor Detail

EweFile.EweEntryFile

public EweFile.EweEntryFile(EweFile ef)
Create an EweEntryFile for a particular EweFile. You can then call getNew(null,"/") to get a representation of the root directory in the EweFile.

Parameters:
ef - the EweFile

EweFile.EweEntryFile

public EweFile.EweEntryFile(EweFile ef,
                            Handle h)
Create an EweEntryFile for a particular EweFile. You can then call getNew(null,"/") to get a representation of the root directory in the EweFile.

Parameters:
ef - the EweFile
h - an optional handle that can be used to abort the construction.
Method Detail

getNew

public File getNew(File parent,
                   String file)
Description copied from class: FileBase
Get a new File object given the directory and new path. This is for objects which inherit from File. The default implementation of this will call getNewInstance() and then call set(File directory,String path). If you do not override getNew() you must override getNewInstance().

Overrides:
getNew in class FileBase

isValid

public boolean isValid()

exists

public boolean exists()
Description copied from class: File
Returns true if the file exists and false otherwise.

Specified by:
exists in class FileAdapter

isDirectory

public boolean isDirectory()
Description copied from class: File
Returns true if the file is a directory and false otherwise.

Specified by:
isDirectory in class FileAdapter

getLength

public int getLength()
Description copied from class: File
Returns the length of the file in bytes.

Specified by:
getLength in class FileAdapter

getSetModified

protected void getSetModified(Time time,
                              boolean doGet)
Description copied from class: FileBase
This gets/sets the modified time of the file. should not exist.

Overrides:
getSetModified in class FileAdapter

set

public void set(File parent,
                String file)
Description copied from class: FileAdapter
This is used to tell the File to represent a different File entity. By default all it does is call setFullPathName() so that the protected name variable represents the full path name. If your File representation has more state than just the full path name, then override this method to setup the new state.

Overrides:
set in class FileAdapter

startFind

protected int startFind(String mask)
Description copied from class: FileAdapter
This is used as the start point for listing. The method should begin the find operation and return a unique ID for the find operation.

Specified by:
startFind in class FileAdapter

findNext

protected Object findNext(int search)
Description copied from class: FileAdapter
This will find the next file in sequence given the search ID returned by startFind(). It can either return a File Object or the name of the file.

Specified by:
findNext in class FileAdapter

endFind

protected void endFind(int search)
Description copied from class: FileAdapter
This tells the File to free all resources associated with the find given the search ID returned by startFind().

Specified by:
endFind in class FileAdapter

getInfo

public Object getInfo(int value,
                      Object source,
                      Object resultDestination,
                      int options)
Description copied from class: File
This method is used to get extended information about the File or the File system in general. It is used with the INFO_ specifiers and options.

Overrides:
getInfo in class FileAdapter

toReadableStream

public Stream toReadableStream()
                        throws IOException
Description copied from class: FileBase
Create and return a Stream to use for reading from the File.

Overrides:
toReadableStream in class FileBase
Returns:
An open Steam that can be used for reading from the File.
Throws:
IOException - if an open stream could not be created.