double seekTime = getSeekTime(size); double transferTime = getTransferTime(obj.getSize());
@Override public double deleteFile(File file) { double result = 0.0; // check if the file is valid or not if (!isFileValid(file, "deleteFile()")) { return result; } double seekTime = getSeekTime(file.getSize()); double transferTime = getTransferTime(file.getSize()); // check if the file is in the storage if (contains(file)) { fileList.remove(file); // remove the file HD nameList.remove(file.getName()); // remove the name from name list currentSize -= file.getSize(); // decrement the current HD space result = seekTime + transferTime; // total time file.setTransactionTime(result); } return result; }
double seekTime = getSeekTime(file.getSize()); double transferTime = getTransferTime(file.getSize());