> Tony Weeg wrote:
>> yeah, well the way i look at it, 90% of the time
>> im going to have to populate a file with data. how that
>> data might come to me, in most cases i think, as part
>> of-or
>> fully contained in a variable, so a len() function should
>> work most of the time...wouldnt you say. but yeah, some
>> cool, ReadCharInFile() function would rock.
> should be something like:
> <cfscript>
> function GetFileLength(filename){
> file = createObject('java', 'java.io.File');
> file.init(filename);
> return file.length();
> }
> </cfscript>
> Very simular functions can be made for CanRead, CanWrite,
> delete,
> exists,isDirectory, isFile, lastModified, renameTo,
> setLastModified,
> setReadOnly.
> Maybe I'm up to it tonight. If I am, I'll sumbit them to
> the cflib.
There are already functions for exists() -- fileexists() and
directoryexists() ... but the rest of them would be rather useful....
Isaac
Certified Advanced ColdFusion 5 Developer
www.turnkey.to
954-776-0046
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm