Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

11
LINES

< > BotCompany Repo | #1028012 // renameFilesInDir

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (2712L) is out of date.

1  
svoid renameFilesInDir(IF1<File, S> f, File dir) {
2  
  for (File file : listFilesOnly(dir)) {
3  
    S newName = f.get(file);
4  
    if (nempty(newName) && neq(newName, fileName(file)))
5  
      renameFileVerbose(file, newName);
6  
  }
7  
}
8  
9  
svoid renameFilesInDir(File dir, IF1<File, S> f) {
10  
  renameFilesInDir(f, dir);
11  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028012
Snippet name: renameFilesInDir
Eternal ID of this version: #1028012/3
Text MD5: aaf362b33633b882e72430ee3a82326b
Author: stefan
Category: javax / html
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-05-03 17:55:25
Source code size: 311 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 107 / 167
Version history: 2 change(s)
Referenced in: [show references]