|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.sys.ImgFS
public class ImgFS
The img file is really a filesystem containing several files. It is made up of a header, a directory area and a data area which occur in the filesystem in that order.
Method Summary | |
---|---|
void |
close()
Close the filesystem. |
ImgChannel |
create(java.lang.String name)
Create a new file, it must not already exist. |
static FileSystem |
createFs(java.lang.String filename,
FileSystemParam params)
Create an IMG file from its external filesystem name and optionally some parameters. |
FileSystemParam |
fsparam()
Get the filesystem / archive parameters. |
void |
fsparam(FileSystemParam param)
Reconfigure the filesystem with the given parameters. |
java.util.List<DirectoryEntry> |
list()
List all the files in the directory. |
DirectoryEntry |
lookup(java.lang.String name)
Lookup the file and return a directory entry for it. |
ImgChannel |
open(java.lang.String name,
java.lang.String mode)
Open a file. |
static FileSystem |
openFs(java.lang.String name)
Open an existing IMG file system. |
void |
sync()
Sync with the underlying file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FileSystem createFs(java.lang.String filename, FileSystemParam params) throws FileNotWritableException
filename
- The name of the file to be created.params
- File system parameters. Can not be null.
FileNotWritableException
- If the file can not be written to.public static FileSystem openFs(java.lang.String name) throws java.io.FileNotFoundException
name
- The file name to open.
java.io.FileNotFoundException
- When the file doesn't exist or can't be
read.public ImgChannel create(java.lang.String name) throws FileExistsException
create
in interface FileSystem
name
- The file name.
FileExistsException
- If the file already exists.public ImgChannel open(java.lang.String name, java.lang.String mode) throws java.io.FileNotFoundException
open
in interface FileSystem
name
- The file name to open.mode
- Either "r" for read access, "w" for write access or "rw"
for both read and write.
java.io.FileNotFoundException
- When the file does not exist.public DirectoryEntry lookup(java.lang.String name) throws java.io.FileNotFoundException
lookup
in interface FileSystem
name
- The filename to look up.
java.io.FileNotFoundException
- If an error occurs looking for the file,
including it not existing.public java.util.List<DirectoryEntry> list()
list
in interface FileSystem
public FileSystemParam fsparam()
FileSystem
fsparam
in interface FileSystem
public void fsparam(FileSystemParam param)
FileSystem
fsparam
in interface FileSystem
param
- The new parameters.public void sync() throws java.io.IOException
sync
in interface FileSystem
java.io.IOException
- If an error occurs during the write.public void close()
close
in interface java.io.Closeable
close
in interface FileSystem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |