How can I rename a file?

John Zukowski

The File class has a renameTo() method that allows you to rename files, just pass in an argument of the new name as a File object. A boolean status is returned to report success or failure.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact