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

3
LINES

< > BotCompany Repo | #1024340 // directoryIsEmpty - also true for non-existant or not a directory

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

Transpiled version (1666L) is out of date.

sbool directoryIsEmpty(File f) {
  ret !fileExists(f) || isDirectory(f) && empty(listFiles(f));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024340
Snippet name: directoryIsEmpty - also true for non-existant or not a directory
Eternal ID of this version: #1024340/2
Text MD5: bef33c22b5109acac97a205af29483f1
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-10-16 19:46:53
Source code size: 99 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 168 / 258
Version history: 1 change(s)
Referenced in: [show references]