mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-10-01 12:15: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:
+7
-2
@@ -8,13 +8,18 @@
|
||||
*******************************************************************************/
|
||||
package org.cryptomator.filesystem.blockaligned;
|
||||
|
||||
import org.cryptomator.filesystem.FileSystem;
|
||||
import org.cryptomator.filesystem.Folder;
|
||||
import org.cryptomator.filesystem.delegating.DelegatingFileSystem;
|
||||
|
||||
class BlockAlignedFileSystem extends BlockAlignedFolder implements FileSystem {
|
||||
class BlockAlignedFileSystem extends BlockAlignedFolder implements DelegatingFileSystem {
|
||||
|
||||
public BlockAlignedFileSystem(Folder delegate, int blockSize) {
|
||||
super(null, delegate, blockSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Folder getDelegate() {
|
||||
return delegate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+10
@@ -55,6 +55,16 @@ class CryptoFileSystem extends CryptoFolder implements FileSystem {
|
||||
return physicalRoot.folder(DATA_ROOT_DIR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Long> quotaUsedBytes() {
|
||||
return physicalRoot.fileSystem().quotaUsedBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Long> quotaAvailableBytes() {
|
||||
return physicalRoot.fileSystem().quotaAvailableBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<CryptoFolder> parent() {
|
||||
return Optional.empty();
|
||||
|
||||
Reference in New Issue
Block a user