com.planet_ink.coffee_mud.core
Class CMFile.CMVFSFile

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.CMFile.CMVFSFile
Direct Known Subclasses:
CMFile.CMVFSDir
Enclosing class:
CMFile

public static class CMFile.CMVFSFile
extends java.lang.Object


Field Summary
protected  int mask
           
protected  java.lang.String path
           
 
Constructor Summary
CMFile.CMVFSFile(java.lang.String path, int mask, long modifiedDateTime, java.lang.String author)
          Creates an internal VFS file based on given variables.
 
Method Summary
 void copyInto(CMFile.CMVFSFile f2)
          Makes the given VFS file identical to this one
 int getMaskBits(MOB accessor)
          Return bits associated with this file.
 java.lang.String getPath()
          Get the full path of this VFS file and name
 java.lang.Object readData()
          Returns the object associated with the data of this file.
 void saveData(java.lang.String filename, int vfsBits, java.lang.String author, java.lang.Object O)
          Creates, Adds, and saves a VFS file with the given stats.
 void setData(java.lang.Object o)
          Changes the internal data object of this file, typically during read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected java.lang.String path

mask

protected int mask
Constructor Detail

CMFile.CMVFSFile

public CMFile.CMVFSFile(java.lang.String path,
                        int mask,
                        long modifiedDateTime,
                        java.lang.String author)
Creates an internal VFS file based on given variables. Mask bitmap is determined by CMFile.VFS_MASK_DIRECTORY, CMFile.VFS_MASK_HIDDEN etc.

Parameters:
path - full path and filename
mask - bitmap of file bits
modifiedDateTime - creation/modified time for the vfs file
author - the author/owner of the file
Method Detail

copyInto

public void copyInto(CMFile.CMVFSFile f2)
Makes the given VFS file identical to this one

Parameters:
f2 - the VFS file object to alter

getPath

public java.lang.String getPath()
Get the full path of this VFS file and name

Returns:
the full path and name of this vfs file

getMaskBits

public int getMaskBits(MOB accessor)
Return bits associated with this file. CMFile.VFS_MASK_DIRECTORY, CMFile.VFS_MASK_HIDDEN etc.

Parameters:
accessor - the mob who wants to access this file.
Returns:
bits associated with this file.

readData

public java.lang.Object readData()
Returns the object associated with the data of this file. Can be a String, StringBuffer, byte[] array, or null.

Returns:
the object associated with the data of this file.

saveData

public void saveData(java.lang.String filename,
                     int vfsBits,
                     java.lang.String author,
                     java.lang.Object O)
Creates, Adds, and saves a VFS file with the given stats. There is no known connection to the wrapping CMVFSFile. CMFile.VFS_MASK_DIRECTORY, CMFile.VFS_MASK_HIDDEN etc.

Parameters:
filename - the full path and name of the file
vfsBits - masking bits
author - the author/owner of the file
O - the string, stringbuffer, byte[], or null

setData

public void setData(java.lang.Object o)
Changes the internal data object of this file, typically during read.

Parameters:
o - the string, stringbuffer, byte[] or null object