FileCanRead([filename])
Last updated November 14, 2002
Version: 1 | Requires: ColdFusion MX | Library: FileSysLib
Description:
Checks if a file can be read. It uses the standard Java File object, which makes it very fast under Coldfusion MX
Return Values:
Returns a boolean.
Example:
<cfoutput>
Length: #FileCanRead(filename)#<br>
</cfoutput>
Parameters:
| Name | Description | Required |
|---|---|---|
| filename | The file to check. | No |
Full UDF Source:
<cfscript>
/**
* Checks if a file can be read.
*
* @param filename The file to check. (Optional)
* @return Returns a boolean.
* @author Jesse Houwing (j.houwing@student.utwente.nl)
* @version 1, November 14, 2002
*/
function FileCanRead(filename){
var daFile = createObject("java", "java.io.File");
daFile.init(JavaCast("string", filename));
return daFile.canRead();
}
</cfscript>
Search CFLib.org
Latest Additions
Shawn Porter added
DeMoronize
3 hour(s) ago
Chris Carey added
readPropertiesFi...
1 day(s) ago
Randy Johnson added
lastDayofWeek
3 day(s) ago
Frank Marion added
sitemapPing
7 day(s) ago
Top Rated
QuickSort
Rated 5.0, 3 time(s)
indentXml
Rated 5.0, 3 time(s)
queryColumnsToSt...
Rated 5.0, 3 time(s)
generateSsccAsn
Rated 5.0, 3 time(s)