Motorola E680 Technical Manual - Page 69
Get file's attributes
View all Motorola E680 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 69 highlights
16 File System Access API ... } /* * Get file size */ try { long fileSize = fc.fileSize(); } catch (IOException ioe) { ... } /* * Set file's attributes */ try { boolean isSetToWrite = fc.setWriteable(true); } catch (IOException ioe) { ... } try { boolean isSetToRead = fc.setReadable(true); } catch (IOException ioe) { ... } try { boolean isSetHidden =fc.setHidden(true); } catch (IOException ioe) { ... } /* * Get file's attributes */ try { boolean isWriteable = fc.canWrite(); } catch (IOException ioe) { ... } try { boolean isReadable =fc.canRead(); } catch (IOException ioe) { ... } try { boolean isHidden =fc.isHidden(); } catch (IOException ioe) { ... } /* * Rename file 69
16
File System Access API
69
…
}
/*
* Get file size
*/
try {
long fileSize = fc.fileSize();
} catch (IOException ioe) {
…
}
/*
* Set file's attributes
*/
try {
boolean isSetToWrite = fc.setWriteable(true);
} catch (IOException ioe) {
…
}
try {
boolean isSetToRead = fc.setReadable(true);
} catch (IOException ioe) {
…
}
try {
boolean isSetHidden =fc.setHidden(true);
} catch (IOException ioe) {
…
}
/*
* Get file's attributes
*/
try {
boolean isWriteable = fc.canWrite();
} catch (IOException ioe) {
…
}
try {
boolean isReadable =fc.canRead();
} catch (IOException ioe) {
…
}
try {
boolean isHidden =fc.isHidden();
} catch (IOException ioe) {
…
}
/*
* Rename file