Motorola E680 Technical Manual - Page 70
FileSystemRegistry Class
View all Motorola E680 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 70 highlights
*/ boolean isRenamed = fc.rename("file://"+root+"newfile.txt"); /* * Get path and URL of file */ java.lang.String filePath = fc.getPath(); java.lang.String fileURL = fc.getURL(); /* * Get time of last modification */ long lastModifiedTime = fc.lastModified(); /* * Delete file */ boolean isDeleted = fc.delete(); /* * Close File Connection */ try { fc.close(); } catch (IOException ioe) { ... } FileSystemRegistry Class /* * Get list of roots */ java.lang.String listOfRoot = FileSystemRegistry.listRoots(); /* * To add/remove file system listener it is necessary to create an instance of FileSystemListener interface: */ Listener newListener = new Listener(); /* * add listener */ FileSystemRegistry.addFileSystemListener(listener); 70
70
*/
boolean isRenamed =
fc.rename("file://"+root+"newfile.txt");
/*
* Get path and URL of file
*/
java.lang.String filePath = fc.getPath();
java.lang.String fileURL = fc.getURL();
/*
* Get time of last modification
*/
long lastModifiedTime = fc.lastModified();
/*
* Delete file
*/
boolean isDeleted = fc.delete();
/*
* Close File Connection
*/
try {
fc.close();
} catch (IOException ioe) {
…
}
FileSystemRegistry Class
/*
* Get list of roots
*/
java.lang.String listOfRoot =
FileSystemRegistry.listRoots();
/*
*
To add/remove file system listener it is necessary to
create an instance of FileSystemListener interface:
*/
Listener newListener = new Listener();
/*
* add listener
*/
FileSystemRegistry.addFileSystemListener(listener);