View Single Post
  #2017  
Old 05.11.2021, 16:44
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,044
Default

@mrjjones: You're welcome nice and easy solution

@tb21: I could not reproduce issues with moveTo when on same drive/mountpoint.

renameTo(returns false/true) is the same as rename(returns null/new File object): full path to file/folder
rename/moves the file/folder but does NOT auto create parent folder. fails if parent folder does not exist


moveTo(returns true/false): full path to file/folder
rename/moves the file/folder but does auto create parent folder if not exist yet


renameName: change name only -> new name of file/folder only
renamePath: change parent of file/folder -> full path of new parent folder, name of file/folder is the same
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 05.11.2021 at 20:07.
Reply With Quote