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

9
LINES

< > BotCompany Repo | #1020505 // listFileNamesPlusSomeInfo_1 - name plus size (size = -1 if directory)

JavaX fragment (include)

static LPair<S, Long> listFileNamesPlusSomeInfo_1(File dir) {
  ret map(listFiles(dir), func(File f) -> Pair<S, Long> {
    pair(f.getName(), f.isDirectory() ? -1 : fileSize(f))
  });
}

static LPair<S, Long> listFileNamesPlusSomeInfo_1(S dir) {
  ret listFileNamesPlusSomeInfo_1(newFile(dir));
}

Author comment

Began life as a copy of #1001459

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020505
Snippet name: listFileNamesPlusSomeInfo_1 - name plus size (size = -1 if directory)
Eternal ID of this version: #1020505/2
Text MD5: 694c58930787d291c725353948beaca6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-12-25 16:42:21
Source code size: 304 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 186 / 224
Version history: 1 change(s)
Referenced in: [show references]