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).

static LS fileInfoHintsWithDate(File f) {
  new LS hints;
  if (f == null) ret hints;
  
  if (f.isFile()) {
    //hints.add("file");
    hints.add(n2(fileSize(f)) + " bytes";
    hints.add("modified " + renderFileDateWithSeconds(f));
  } else if (f.isDirectory())
    hints.add("dir");
  else
    hints.add("not found");
    
  ret hints;
}

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: 175 / 250
Version history: 3 change(s)
Referenced in: [show references]