mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
Refactored FileUtils.
Removed methods that are no longer needed for Java 6, moved the remaining method into the utils directory.
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
package org.briarproject.plugins.file;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import org.briarproject.api.TransportId;
|
||||
import org.briarproject.api.plugins.simplex.SimplexPlugin;
|
||||
import org.briarproject.api.plugins.simplex.SimplexPluginCallback;
|
||||
import org.briarproject.api.plugins.simplex.SimplexPluginFactory;
|
||||
import org.briarproject.api.system.FileUtils;
|
||||
import org.briarproject.util.OsUtils;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
public class RemovableDrivePluginFactory implements SimplexPluginFactory {
|
||||
|
||||
// Maximum latency 14 days (Royal Mail or lackadaisical carrier pigeon)
|
||||
@@ -16,12 +15,9 @@ public class RemovableDrivePluginFactory implements SimplexPluginFactory {
|
||||
private static final int POLLING_INTERVAL = 10 * 1000; // 10 seconds
|
||||
|
||||
private final Executor ioExecutor;
|
||||
private final FileUtils fileUtils;
|
||||
|
||||
public RemovableDrivePluginFactory(Executor ioExecutor,
|
||||
FileUtils fileUtils) {
|
||||
public RemovableDrivePluginFactory(Executor ioExecutor) {
|
||||
this.ioExecutor = ioExecutor;
|
||||
this.fileUtils = fileUtils;
|
||||
}
|
||||
|
||||
public TransportId getId() {
|
||||
@@ -49,7 +45,7 @@ public class RemovableDrivePluginFactory implements SimplexPluginFactory {
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
return new RemovableDrivePlugin(ioExecutor, fileUtils, callback,
|
||||
finder, monitor, MAX_LATENCY);
|
||||
return new RemovableDrivePlugin(ioExecutor, callback, finder, monitor,
|
||||
MAX_LATENCY);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user