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

15
LINES

< > BotCompany Repo | #1032900 // fileInfoHintsWithDate

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

Libraryless. Click here for Pure Java version (4039L/23K).

1  
static LS fileInfoHintsWithDate(File f) {
2  
  new LS hints;
3  
  if (f == null) ret hints;
4  
  
5  
  if (f.isFile()) {
6  
    //hints.add("file");
7  
    hints.add(n2(fileSize(f)) + " bytes";
8  
    hints.add("modified " + renderFileDateWithSeconds(f));
9  
  } else if (f.isDirectory())
10  
    hints.add("dir");
11  
  else
12  
    hints.add("not found");
13  
    
14  
  ret hints;
15  
}

Author comment

Began life as a copy of #1032898

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1032900
Snippet name: fileInfoHintsWithDate
Eternal ID of this version: #1032900/4
Text MD5: 8c838aeff104d2eca5d50e31835a9c51
Transpilation MD5: a96f38a47d19d61bf7204b6689f2e8e4
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-11 03:57:23
Source code size: 355 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 255
Version history: 3 change(s)
Referenced in: [show references]