Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jdavidb (1361)

jdavidb
  (email not shown publicly)
http://voiceofjohn.blogspot.com/

J. David Blackstone has a Bachelor of Science in Computer Science and Engineering and nine years of experience at a wireless telecommunications company, where he learned Perl and never looked back. J. David has an advantage in that he works really hard, he has a passion for writing good software, and he knows many of the world's best Perl programmers.

Journal of jdavidb (1361)

Thursday March 06, 2008
10:30 AM

Java diamond chip of the day: renameTo()

[ #35851 ]

You can't copy files, but you can rename/move files, which is really what I needed to do anyway. renameTo() is an instance method of the File class and takes another File object as a parameter.

Of course, whether or not it works across filesystem boundaries is platform-dependent in this beautifully portable language. You'll have to check the return value to see if it works.

On my system it doesn't, of course. Which is exactly why I needed it: due to weirdness of this particular mount I need to move a file into it rather than trying to create it and then write to it.

Thankfully I was able to fix some of the weirdness of the mount.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.