Update of /cvsroot/freenet/freenet/src/freenet/fs/dir
In directory sc8-pr-cvs1:/tmp/cvs-serv6916/fs/dir
Modified Files:
Directory.java NativeFSDirectory.java SharedDirectory.java
Log Message:
Add dir.used() and use it everywhere instead of storeSize - dir.available()
I think I got them all, if you know of one I missed PLEASE let me know asap as they
will be broken soon
Index: Directory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/fs/dir/Directory.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- Directory.java 16 Jun 2003 19:38:38 -0000 1.8
+++ Directory.java 18 Nov 2003 13:36:49 -0000 1.9
@@ -36,6 +36,11 @@
long available();
/**
+ * @return the amount of bytes used
+ */
+ long used();
+
+ /**
* @return the size of the largest single, intact Fragment
*/
//long largest();
Index: NativeFSDirectory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/fs/dir/NativeFSDirectory.java,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -w -r1.170 -r1.171
--- NativeFSDirectory.java 10 Nov 2003 09:48:38 -0000 1.170
+++ NativeFSDirectory.java 18 Nov 2003 13:36:49 -0000 1.171
@@ -935,6 +935,12 @@
return avail;
}
+ public long used() {
+ if(logDEBUG)
+ Core.logger.log(this, "spaceUsed = "+spaceUsed, Logger.DEBUG);
+ return spaceUsed;
+ }
+
public boolean writeIndex() {
OutputStream s;
File index = new File(root, "index");
Index: SharedDirectory.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/fs/dir/SharedDirectory.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- SharedDirectory.java 16 Jun 2003 19:38:39 -0000 1.8
+++ SharedDirectory.java 18 Nov 2003 13:36:49 -0000 1.9
@@ -34,6 +34,10 @@
return dir.available();
}
+ public final long used() {
+ return dir.used();
+ }
+
//public final long largest() {
// return dir.largest();
//}
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs