If you want to check out the java way, you can browse through
java.IO.*, which has a lot of IO general classes including working
with the file system, and when in doubt, google it. Generally
speaking, you do something sort of like this:
myFile = createObject("java","java.IO.File").init("c:\myfile.txt");
myFile.createNewFile();
myFile.renameTo(createObject("java","java.IO.File").init("c:\myfile2.txt"));
myFile.delete();
that's totally untested code, btw.
Here's the javadoc link:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html
-nathan strutz
http://www.dopefly.com/
On 10/28/05, Paul <[EMAIL PROTECTED]> wrote:
> I had the same thought, but was curious to learn a little more about how
> Java works. But I did find the wrapper functions already written on
> cflib.org so maybe I'll just do that...
>
> -----Original Message-----
> From: Simeon Bateman [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 28, 2005 1:39 PM
> To: CF-Talk
> Subject: Re: java equivalent of cffile
>
> The stupid simple answer I came up with in seeing your questions, was why
> not just write a couple cffunctions to wrap cffile so you can access it from
> script?
>
> I am probably missing something, but thats where I would look first.
>
> simeon
>
>
> On 10/28/05, Paul <[EMAIL PROTECTED]> wrote:
> >
> > I know this has been covered but I don't know what phrase to search for
> > exactly so here we are.
> >
> >
> >
> > How can I do CFFILE-like actions (create, overwrite, delete) within
> > cfscript? I'm sure I can use the built-in Java functionality but I don't
> > know what that is.
> >
> >
> >
> > TIA
> >
> >
> >
> > Paul
> >
> >
> >
> >
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222615
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54