mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-09-11 02:26:32 +00:00
support for RFC 4331: DAV:quota-available-bytes and DAV:quota-used-bytes
references #97; quota calculation in NIO filesystem still missing
This commit is contained in:
+12
@@ -39,4 +39,16 @@ public class InMemoryFileSystem extends InMemoryFolder implements FileSystem {
|
||||
return "/";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Long> quotaUsedBytes() {
|
||||
long used = Runtime.getRuntime().totalMemory();
|
||||
return Optional.of(used);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Long> quotaAvailableBytes() {
|
||||
long available = Runtime.getRuntime().freeMemory();
|
||||
return Optional.of(available);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user