소스 검색

connected filesystem stats

Sebastian Stenzel 8 년 전
부모
커밋
e09ee27219
1개의 변경된 파일12개의 추가작업 그리고 4개의 파일을 삭제
  1. 12 4
      main/ui/src/main/java/org/cryptomator/ui/model/Vault.java

+ 12 - 4
main/ui/src/main/java/org/cryptomator/ui/model/Vault.java

@@ -187,13 +187,21 @@ public class Vault {
 	}
 
 	public long pollBytesRead() {
-		// TODO overheadhunter implement.
-		return 0l;
+		CryptoFileSystem fs = cryptoFileSystem.get();
+		if (fs != null) {
+			return fs.getStats().pollBytesRead();
+		} else {
+			return 0l;
+		}
 	}
 
 	public long pollBytesWritten() {
-		// TODO overheadhunter implement.
-		return 0l;
+		CryptoFileSystem fs = cryptoFileSystem.get();
+		if (fs != null) {
+			return fs.getStats().pollBytesWritten();
+		} else {
+			return 0l;
+		}
 	}
 
 	public String getMountName() {