And you can, just omit the filename from the path. A File object in Java doesn't have to be a file in the traditional sense, it could just as well be a directory.
var myFileDir = <THE PATH TO THE DIRECTORY> var myFile = CreateObject("java", "java.io.File").init(myFilePath) if( myFile.canWrite() ) { // Do stuff } Max http://anvilcreative.com On 8/19/07, Rick Root <[EMAIL PROTECTED]> wrote: > On 8/18/07, Janet MacKay <[EMAIL PROTECTED]> wrote: > > I would guess its because the file doesn't exist. > > > > http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#canWrite() > > Returns: true if and only if the file system actually contains a file > > denoted by this abstract pathname ... > > Shoot, I read that and it didn't occur to me that it would return > false if the file didn't exist. > > I totally misread the use of that function, I was thinking that I > could use it to determine if Java was able to create a file in that > directory. > > Guess I'll keep movin' on > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Check out the new features and enhancements in the latest product release - download the "What's New PDF" now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286568 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4