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


< > BotCompany Repo | #1016098 // conceptBackupFiles

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

Libraryless. Click here for Pure Java version (5558L/31K).

// sorted by descending date
static L<File> conceptBackupFiles(S progID) {
  ret conceptBackupFiles(programDir(progID));

static L<File> conceptBackupFiles(File dir) {
  S regexp = "^(.*)\\.backup(20\\d\\d)(\\d\\d)(\\d\\d)-(\\d+)$";
  new L<File> l;
  for (File f : listFilesNotDirs(dir, newFile(dir, "backups"))) {
    S s = f.getName();
    S originalName = regexpFirstGroup(regexp, s);
    continue unless eq(originalName, "concepts.structure.gz");
  ret sortFilesByNameDesc(l);

download  show line numbers  debug dex  old transpilations   

Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv

No comments. add comment

Snippet ID: #1016098
Snippet name: conceptBackupFiles
Eternal ID of this version: #1016098/6
Text MD5: fea15582e5737e6d40f43367f26f7569
Transpilation MD5: ae372899a6033b5307594a855e822542
Author: stefan
Category: javax / concepts
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-31 20:01:07
Source code size: 518 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 348 / 457
Version history: 5 change(s)
Referenced in: [show references]