🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19251

Re: File Copy

#19251
From: Rich Wilkman
Date: Thu, 19 Feb 1998 00:00
50 lines
2021 bytes
James:

Sorry, I must have missed that part.  You probably already know the
answer as to why it's not built in.  Having written file i/o stuff on
a few different platforms I can tell you that there isn't a standard
way to do it (though it may look standard from the API level,
underneath is what counts).

Rename is easy -- you don't need access to the file, just to it's name
stub.

I know you don't want system calls, but if you have open access in
your application it's a pretty finite list of commands.  The biggest
weakness from system calls is that you don't get a useful return
value.

-Rich

Maybe someday...

James D. Frentress wrote:
> 
> Rich Wilkman wrote:
> 
> > Try Runtime.exec("c:\command.com /c copy file1 file2")
> >
> 
> That's what I meant by "...make a System shell call...". It's just not
> portable. As I told Andrew, I just can't figure out why there is a
> File.renameTo() but no File.copyTo().
> 
> Thanks Rich,
> 
> Jim

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rich Wilkman
Senior Quality Assurance Engineer
Borland JBuilder Team

If you see something that looks like an opinion up there,
it's mine and mine alone.

Mail sent to me from the newsgroups won't bounce but will
be ignored.  If I have time, I'll respond, but you  have
a better chance if you confine your posts to the newsgroups
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Technical Details
Message-ID: <34ECC0A6.DEBA20C2@corp.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34EB98D0.26C6EB8B@ForAWhile.com> <34EC643E.3875607@corp.borland.com> <34EC97AF.F7CC8BFB@ForAWhile.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,e4e7d7ce877368e7
X-Google-Attributes: gidf74b3,public
From: Rich Wilkman <rwilkman@corp.borland.com>
Subject: Re: File Copy
Date: 1998/02/19
Message-ID: <34ECC0A6.DEBA20C2@corp.borland.com>
X-Deja-AN: 326749179
Content-Transfer-Encoding: 7bit
References: <34EB98D0.26C6EB8B@ForAWhile.com> <34EC643E.3875607@corp.borland.com> <34EC97AF.F7CC8BFB@ForAWhile.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Organization: None
Newsgroups: borland.public.jbuilder.java.language