use of org.graalvm.component.installer.os.DefaultFileOperations in project graal by oracle.
the class InstallerTest method setUp.
@Before
public void setUp() throws IOException {
targetPath = folder.newFolder("inst").toPath();
storage = new MockStorage();
registry = new ComponentRegistry(this, storage);
fileOps = SystemUtils.isWindows() ? new WindowsFileOperations() : new DefaultFileOperations();
fileOps.init(this);
fileOps.setRootPath(targetPath);
}
use of org.graalvm.component.installer.os.DefaultFileOperations in project graal by oracle.
the class FileOperations method createPlatformInstance.
public static FileOperations createPlatformInstance(Feedback f, Path rootPath) {
FileOperations inst;
if (SystemUtils.isWindows()) {
WindowsFileOperations w = new WindowsFileOperations();
inst = w;
if (!ImageInfo.inImageCode()) {
w.setDelayDeletedList(SystemUtils.fromUserString(System.getenv(CommonConstants.ENV_DELETE_LIST)));
w.setCopyContents(SystemUtils.fromUserString(System.getenv(CommonConstants.ENV_COPY_CONTENTS)));
}
} else {
inst = new DefaultFileOperations();
}
inst.init(f);
inst.setRootPath(rootPath);
return inst;
}
Aggregations