Just an FYI, you should not create variables in UDFs without using the
var scope.
> function FileLength(filename){
> _File = createObject('java', 'java.io.File');
> _File.init(JavaCast('string', filename));
> return _File.length();
> }
should be
> function FileLength(filename){
> var _File = createObject('java', 'java.io.File');
> _File.init(JavaCast('string', filename));
> return _File.length();
> }
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire
Email : [EMAIL PROTECTED]
WWW : www.camdenfamily.com/morpheus
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
> -----Original Message-----
> From: Jesse Houwing [mailto:j.houwing@;student.utwente.nl]
> Sent: Sunday, October 20, 2002 6:57 PM
> To: CF-Talk
> Subject: File meta data lib (was: Re: counting # of
> characters in file)
>
>
> >>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....
>
> Ok, I did it, and it didn't even require aa wrapperclass :)
>
> The code is as follows:
>
> <cfscript>
> function FileLength(filename){
> _File = createObject('java', 'java.io.File');
> _File.init(JavaCast('string', filename));
> return _File.length();
> }
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm