From 0123ed80af4c4d1d013815f59e2f1a0d19909b46 Mon Sep 17 00:00:00 2001 From: Xing Yang Date: Sun, 29 Oct 2023 15:33:47 -0700 Subject: [PATCH] Issue 48564: update create folder util (#780) --- src/org/labkey/targetedms/SkylineDocImporter.java | 2 +- src/org/labkey/targetedms/TargetedMSController.java | 2 +- src/org/labkey/targetedms/TargetedMSDataHandler.java | 2 +- .../labkey/targetedms/chromlib/ChromatogramLibraryUtils.java | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/org/labkey/targetedms/SkylineDocImporter.java b/src/org/labkey/targetedms/SkylineDocImporter.java index c1822222d..aba4406bd 100644 --- a/src/org/labkey/targetedms/SkylineDocImporter.java +++ b/src/org/labkey/targetedms/SkylineDocImporter.java @@ -2331,7 +2331,7 @@ private void copyExtractedFilesToCloud(TargetedMSRun run) try { if (!Files.exists(targetParentPath)) - Files.createDirectory(targetParentPath); + FileUtil.createDirectory(targetParentPath); ExpData skydData = run.getSkydDataId() == null ? null : ExperimentService.get().getExpData(run.getSkydDataId()); if (skydData != null) diff --git a/src/org/labkey/targetedms/TargetedMSController.java b/src/org/labkey/targetedms/TargetedMSController.java index 21b6a0619..ffe2e86b1 100644 --- a/src/org/labkey/targetedms/TargetedMSController.java +++ b/src/org/labkey/targetedms/TargetedMSController.java @@ -569,7 +569,7 @@ public static void configureRawDataTab(Portal.WebPart webPart, Container c, File { try { - Files.createDirectories(rawFileDir); + FileUtil.createDirectories(rawFileDir); } catch (IOException e) { diff --git a/src/org/labkey/targetedms/TargetedMSDataHandler.java b/src/org/labkey/targetedms/TargetedMSDataHandler.java index ad057e84d..f36b7661e 100644 --- a/src/org/labkey/targetedms/TargetedMSDataHandler.java +++ b/src/org/labkey/targetedms/TargetedMSDataHandler.java @@ -259,7 +259,7 @@ public void runMoved(ExpData newData, Container container, Container targetConta if (Files.exists(sourceDir) && Files.isDirectory(sourceDir)) { if (!Files.exists(destDir)) - Files.createDirectory(destDir); + FileUtil.createDirectory(destDir); if (Files.isDirectory(destDir)) { try (Stream paths = Files.list(sourceDir)) diff --git a/src/org/labkey/targetedms/chromlib/ChromatogramLibraryUtils.java b/src/org/labkey/targetedms/chromlib/ChromatogramLibraryUtils.java index 4ef299f2b..2f0be57f8 100644 --- a/src/org/labkey/targetedms/chromlib/ChromatogramLibraryUtils.java +++ b/src/org/labkey/targetedms/chromlib/ChromatogramLibraryUtils.java @@ -187,7 +187,7 @@ public static Path getChromLibTempFile(Container container, LocalDirectory local File localDir = localDirectory.getLocalDirectoryFile(); Path chromLibDir = localDir.toPath().resolve(CHROM_LIB_FILE_DIR); if(!Files.exists(chromLibDir)) - Files.createDirectory(chromLibDir); + FileUtil.createDirectory(chromLibDir); return chromLibDir.resolve( FileUtil.makeFileNameWithTimestamp(CHROM_LIB_FILE_BASE_NAME+"_"+container.getRowId()+"_rev"+revision, CHROM_LIB_FILE_EXT)); @@ -203,7 +203,7 @@ private static Path getChromLibDir(Container container, boolean createLibDir) th Path chromLibDir = root.getRootNioPath().resolve(CHROM_LIB_FILE_DIR); if(!Files.exists(chromLibDir) && createLibDir) { - Files.createDirectory(chromLibDir); + FileUtil.createDirectory(chromLibDir); } return chromLibDir; }