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

17
LINES

< > BotCompany Repo | #1004525 // jShowFile

JavaX fragment (include)

static void jShowFile(File f) {
  if (!f.exists()) ret;
  
  if (f.isDirectory()) {
    browseDir(f);
    ret;
  }
  
  if (f.getName().toLowerCase().endsWith(".mp4")) {
    playVideo(f);
    ret;
  }
  
  // default to showing text
  S data = readTextFile(f);
  showText(f2s(f), data);
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004525
Snippet name: jShowFile
Eternal ID of this version: #1004525/1
Text MD5: a2ef1db7eb8aa07676343c998e674220
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-19 16:23:54
Source code size: 304 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 617 / 620
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)