Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
Currently File's renameTo takes in a File object. I think it would be groovier to allow a String to be passed in representing the rename - having to create a File to rename to seems a little strange.
Something like,
public boolean renameTo(String path)
{
return this.renameTo(new File(path))
}
Calling code now becomes,
file.renameTo("/somewhere/file.txt")
instead of
file.renameTo(new File("/somewhere/file.txt"))
Hi. Any objections to adding this convenience method?