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

17
LINES

< > BotCompany Repo | #1026331 // startPlatformFileManager

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

Libraryless. Click here for Pure Java version (7433L/44K).

1  
// Can probably also use desktopOpen()
2  
svoid startPlatformFileManager(File dir) {
3  
  // Chasing the super weird bug on Linux that starts Stefan's OS when calling this function
4  
  if (isOnPATH("gio"))
5  
    //ret with linux_runGIO("open " + pqO(dir));
6  
    ret with linux_gioOpen(dir);
7  
    
8  
  S cmd = isWindows() ? "start"
9  
    : isMac() ? "open"
10  
    : isOnPATH("gio") ? "gio open"
11  
    : firstCmdOnPATH_mandatory("xdg-open");
12  
  cmd += " " + pqO(dir);
13  
  print("Starting platform file manager");
14  
  //nohup(cnd);
15  
  backtick_verbose(cmd);
16  
  print("Platform file manager exited");
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1026331
Snippet name: startPlatformFileManager
Eternal ID of this version: #1026331/9
Text MD5: 474f0eef1895ce7e2590a3abb90a67b1
Transpilation MD5: 9f5dd937ef5290a5f96aacbbff0ee22b
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-28 23:44:13
Source code size: 586 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 148 / 256
Version history: 8 change(s)
Referenced in: [show references]