
apploader.lib.OfflineFileLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of apploader-lib Show documentation
Show all versions of apploader-lib Show documentation
Framework for delivering desktop application updates
The newest version!
package apploader.lib;
import apploader.common.Application;
import java.io.File;
import java.util.Collections;
import java.util.List;
public final class OfflineFileLoader extends IFileLoader {
private final ILoaderGui gui;
public OfflineFileLoader(ILoaderGui gui) {
this.gui = gui;
}
public File getLocalFile(String file) {
return new File(file).getAbsoluteFile();
}
public FileResult receiveFile(String file, boolean silent, boolean noTrace) {
File local = getLocalFile(file);
if (local.exists()) {
return new FileResult(local, false, false);
} else {
if (!silent) {
gui.showError("Файл " + file + " отсутствует");
}
return new FileResult(null, false, false);
}
}
public List loadApplications(String file, String app) {
return Collections.singletonList(new Application(app, app));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy