Class File
- java.lang.Object
-
- org.deepjava.runtime.mpc555.driver.ffs.File
-
public class File extends Object
File, which can be used by the flash file system (FFS)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
address()
Returns address of first block of file.void
delete()
Deletes file in directory.int
length()
Returns length of file in bytes.void
register()
Writes file length into directory.
-
-
-
Field Detail
-
name
public String name
-
len
public int len
-
filler
byte filler
-
addr
int addr
-
blocks
int[] blocks
-
valid
boolean valid
-
-
Constructor Detail
-
File
public File(String name)
Creates new file, if file with this name already exists, existing file is deleted first returns null if maximum number of files is exceeded- Parameters:
name
- Name of the file
-
-
Method Detail
-
address
public int address()
Returns address of first block of file.- Returns:
- Address of file.
-
length
public int length()
Returns length of file in bytes.- Returns:
- Length in bytes.
-
register
public void register()
Writes file length into directory.
-
delete
public void delete()
Deletes file in directory.
-
-