|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object diamondedge.util.FileSystem
public class FileSystem
Constructor Summary | |
---|---|
FileSystem()
|
Method Summary | |
---|---|
static void |
close()
|
static void |
close(int fileNum)
|
static int |
getAttr(File file)
File attributes |
static int |
getAttr(String pathName)
|
static String |
getBaseName(String path)
Return the BaseName from a path |
static String |
getDriveName(String path)
Return drive from a path |
static String |
getExtensionName(String path)
Return the Extension from a path |
static Date |
getFileDateTime(String pathName)
|
static int |
getFileLen(int fileNum)
returns the length of the file |
static int |
getFileLen(String pathName)
returns the length of the file |
static int |
getFileLoc(int fileNum)
returns the location (file position) in the input file |
static int |
getFreeFile()
|
static InputFile |
in(int fileNum)
|
static boolean |
isEOF(int fileNum)
|
static void |
kill(String pathName)
Deletes the file |
static File |
mkDir(String pathName)
|
static AppendFile |
openAppend(String path,
int fileNum)
|
static RandomAccessFile |
openFile(String fileName,
int openMode)
|
static RandomAccessFile |
openFile(String fileName,
String openMode)
|
static InputFile |
openInput(String path,
int fileNum)
|
static OutputFile |
openOutput(String path,
int fileNum)
|
static OutputFile |
out(int fileNum)
|
static String |
readString(RandomAccessFile file,
int nChars)
|
static void |
rmDir(String pathName)
|
static int |
seek(int fileNum)
Returns aLong specifying the current read/write position within a file opened using the Open statement. |
static void |
seek(int fileNum,
int pos)
Sets the position for the next read/write operation within a file opened using the Open statement. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileSystem()
Method Detail |
---|
public static int getFreeFile()
public static InputFile in(int fileNum)
public static OutputFile out(int fileNum)
public static InputFile openInput(String path, int fileNum) throws IOException
IOException
public static OutputFile openOutput(String path, int fileNum) throws IOException
IOException
public static AppendFile openAppend(String path, int fileNum) throws IOException
IOException
public static void close() throws IOException
IOException
public static void close(int fileNum) throws IOException
IOException
public static boolean isEOF(int fileNum) throws IOException
IOException
public static Date getFileDateTime(String pathName) throws IOException
IOException
public static int getFileLen(String pathName) throws IOException
IOException
public static void kill(String pathName) throws IOException
IOException
public static int getFileLoc(int fileNum) throws IOException
IOException
public static int getFileLen(int fileNum) throws IOException
IOException
public static File mkDir(String pathName) throws IOException
IOException
public static void rmDir(String pathName) throws IOException
IOException
public static int seek(int fileNum) throws IOException
IOException
public static void seek(int fileNum, int pos) throws IOException
IOException
public static String getDriveName(String path)
public static String getBaseName(String path)
public static String getExtensionName(String path)
public static int getAttr(File file) throws IOException
Constant Value Description Normal 0 Normal file. No attributes are set. ReadOnly 1 Read-only file. Hidden 2 Hidden file. Directory 16 Folder or directory. Following are not supported: System 4 System file. Volume 8 Disk drive volume label. Archive 32 File has changed since last backup. Alias 64 Link or shortcut. Compressed 128 Compressed file.
IOException
public static int getAttr(String pathName) throws IOException
IOException
public static String readString(RandomAccessFile file, int nChars) throws IOException
IOException
public static RandomAccessFile openFile(String fileName, String openMode) throws IOException
openMode
- r Open a file for reading only. You can't write to this file. rw Open a file for writing.
IOException
public static RandomAccessFile openFile(String fileName, int openMode) throws IOException
openMode
- 1 Open a file for reading only. You can't write to this file. 2 Open a file for writing. 8 Open a file and write to the end of the file.
IOException
|
Diamond Control Suite 3.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |