vc.jni
Class FileSystemHandler
java.lang.Object
|
+--vc.jni.FileSystemHandler
- public class FileSystemHandler
- extends java.lang.Object
FileSystemHandler is the JNI(Java Native Interface) class built to operate the
native file system at a lower level. Right now it has methods to talk to native
libraries (DLL in case of windows) for setting the file properties and deleting a file.
Method Summary |
int |
changeFileMode(java.lang.String FileName,
boolean readOnly)
JNI method that is delegated to the native library method implementing
this method. |
boolean |
changeFileModeOFFiles(java.lang.String[] fileNames,
boolean readOnly)
Wrapper method for the JNI method changeFileModeOFFiles() to change the
file modes to readonly or read-write for the multiple files. |
boolean |
changeFileModeOFFilesInDirectory(java.lang.String dirName,
boolean readOnly)
Wrapper method for the JNI method changeFileModeOFFiles() to change the
file modes to readonly or read-write for the files in the specified directory. |
boolean |
deleteFiles(java.lang.String[] fileNames)
Wrapper method for the JNI method changeFileModeOFFiles() to delete the files specified. |
int |
removeFile(java.lang.String FileName)
JNI method that is delegated to the native library method implementing
this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileSystemHandler
public FileSystemHandler()
changeFileMode
public int changeFileMode(java.lang.String FileName,
boolean readOnly)
- JNI method that is delegated to the native library method implementing
this method. This method is to change the file mode i.e readonly and read-write.
- Parameters:
FileName
- fileneme with the path whose read write permissions are to be changedreadOnly
- if this is true then makes the file readonly or else makes it read-write- Returns:
- Returns if the code that confo=irms the success or else the failure code for the operation
removeFile
public int removeFile(java.lang.String FileName)
- JNI method that is delegated to the native library method implementing
this method. This method is to delete a paerticular file.
- Parameters:
FileName
- fileneme with the path which is to be deleted- Returns:
- Returns if the code that confo=irms the success or else the failure code for the operation
changeFileModeOFFiles
public boolean changeFileModeOFFiles(java.lang.String[] fileNames,
boolean readOnly)
- Wrapper method for the JNI method changeFileModeOFFiles() to change the
file modes to readonly or read-write for the multiple files.
- Parameters:
fileNames
- filenemes with the path whose read write permissions are to be changedreadOnly
- if this is true then makes the files readonly or else makes it read-write- Returns:
- Returns if the code that confirms the success or else the failure code for the operation
changeFileModeOFFilesInDirectory
public boolean changeFileModeOFFilesInDirectory(java.lang.String dirName,
boolean readOnly)
- Wrapper method for the JNI method changeFileModeOFFiles() to change the
file modes to readonly or read-write for the files in the specified directory.
- Parameters:
dirName
- name of the firectory whose files read write permissions are to be changedreadOnly
- if this is true then makes the files readonly or else makes it read-write- Returns:
- Returns if the code that confirms the success or else the failure code for the operation
deleteFiles
public boolean deleteFiles(java.lang.String[] fileNames)
- Wrapper method for the JNI method changeFileModeOFFiles() to delete the files specified.
- Parameters:
fileNames
- filenemes with the path which are to be deleed- Returns:
- Returns if the code that confirms the success or else the failure code for the operation