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

21
LINES

< > BotCompany Repo | #1016279 // oshi_hadDiskAccess

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

Uses 3973K of libraries. Click here for Pure Java version (9310L/52K).

1  
scope oshi_hadDiskAccess.
2  
3  
static L<HWDiskStore> #disks;
4  
5  
static bool oshi_hadDiskAccess() {
6  
  bool yes;
7  
  
8  
  if (disks == null)
9  
    disks = oshi_diskStores(); 
10  
    
11  
  for (HWDiskStore disk : unnull(disks)) pcall {
12  
    long old1 = disk.getReadBytes();
13  
    long old2 = disk.getWriteBytes();
14  
    assertTrue(disk.updateAttributes());
15  
    if (disk.getReadBytes() > old1 || disk.getWriteBytes() > old2) set yes;
16  
  }
17  
  
18  
  yes;
19  
}
20  
  
21  
end scope

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016279
Snippet name: oshi_hadDiskAccess
Eternal ID of this version: #1016279/4
Text MD5: 6615020e4d11dd61afd20089ef44fdb8
Transpilation MD5: 22aa135fe89dffb3b00531dbb3fff555
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-06-04 04:52:48
Source code size: 455 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 320 / 419
Version history: 3 change(s)
Referenced in: [show references]