mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Added dependency injections for FileUtils and removed redundant code
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
package org.briarproject.system;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.briarproject.api.system.FileUtils;
|
||||
|
||||
class DesktopFileUtils implements FileUtils {
|
||||
|
||||
public long getTotalSpace(File f) throws IOException {
|
||||
return f.getTotalSpace(); // Requires Java 1.6
|
||||
}
|
||||
|
||||
public long getFreeSpace(File f) throws IOException {
|
||||
return f.getUsableSpace(); // Requires Java 1.6
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,6 @@ public class DesktopSystemModule extends AbstractModule {
|
||||
bind(Timer.class).to(SystemTimer.class);
|
||||
if (OsUtils.isLinux())
|
||||
bind(SeedProvider.class).to(LinuxSeedProvider.class);
|
||||
bind(FileUtils.class).to(DesktopFileUtils.class);
|
||||
bind(FileUtils.class).to(FileUtilsImpl.class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user