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.

svoid renameFilesInDir(IF1<File, S> f, File dir) {
  for (File file : listFilesOnly(dir)) {
    S newName = f.get(file);
    if (nempty(newName) && neq(newName, fileName(file)))
      renameFileVerbose(file, newName);
  }
}

svoid renameFilesInDir(File dir, IF1<File, S> f) {
  renameFilesInDir(f, dir);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, 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: 27 / 55
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1028012 & http://1028012.tinybrain.de