public final class TapNLinkFS
extends java.lang.Object
Constructor and Description |
---|
TapNLinkFS() |
Modifier and Type | Method and Description |
---|---|
static int |
delete(java.lang.String filename)
Delete the file with the given name.
|
static int |
deleteAll()
Delete all the existing files.
|
static int |
getSize(java.lang.String filename)
Get the size of the file with the given name.
|
static java.lang.String[] |
listFiles(java.lang.String prefix)
List the files that match with 'prefix' and return the list as an array of String.
|
static byte[] |
read(java.lang.String filename,
int pos,
java.lang.Integer size)
Read data from the selected file.
|
static int |
write(java.lang.String filename,
byte[] buffer,
int size)
Write data to the NVM (FLASH).
|
static int |
write(java.lang.String filename,
byte[] buffer,
int size,
int userID,
int bundleId)
Write data to the NVM (FLASH).
|
static int |
write(java.lang.String filename,
java.lang.String str)
Write data to the NVM (FLASH).
|
static int |
write(java.lang.String filename,
java.lang.String str,
int userID,
int bundleId)
Write data to the NVM (FLASH).
|
public static int getSize(java.lang.String filename)
public static int delete(java.lang.String filename)
public static int deleteAll()
public static java.lang.String[] listFiles(java.lang.String prefix)
public static int write(java.lang.String filename, java.lang.String str)
filename
- The String containing the filename to be written.str
- The string to be copied.public static int write(java.lang.String filename, byte[] buffer, int size)
filename
- The String containing the filename to be written.buffer
- The buffer to write.size
- The size to be written.public static int write(java.lang.String filename, java.lang.String str, int userID, int bundleId)
filename
- The String containing the filename to be written.str
- The string to be copied.userID
- In case the file is restricted for a profile/user idbundleId
- In case the file is restricted for a bundleid (and the profile linked to this bundle)public static int write(java.lang.String filename, byte[] buffer, int size, int userID, int bundleId)
filename
- The String containing the filename to be written.buffer
- The buffer to write.size
- The size to be written.userID
- In case the file is restricted for a profile/user idbundleId
- In case the file is restricted for a bundleid (and the profile linked to this bundle)public static byte[] read(java.lang.String filename, int pos, java.lang.Integer size)
pos
- is the offset in the file.size
- is an in/out parameter. As input, it contains the size to be read.