Skip to content

Commit

Permalink
Added folder.exist() checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cctsou committed Jan 12, 2016
1 parent 993cd22 commit 0b18718
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CrossLinker/nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@
<file>file:/C:/Umich/MS-Umpire/CrossLinker/src/crosslinker/CrossLinkerHandler.java</file>
</group>
<group name="MS_Umpire_Tsou">
<file>file:/C:/Umich/MS-Umpire/CrossLinker/src/Exec/CrossLinkerDetection.java</file>
<file>file:/C:/Umich/MS-Umpire/CrossLinker/src/crosslinker/CrossLinkerHandler.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/PrecursorCrossPepFinder.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/CrosslinkerPepFinder.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/CXL_MALDI.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/PeakPairFinder.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/MS2PeakPairFinder.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/Exec/cxl.params</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/SortedFragFinder.java</file>
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/Exec/CrossLinkerDetection.java</file>
</group>
<group name="DIA-Umpire_Release">
<file>file:/C:/Umich/GitHub/DIA-Umpire/CrossLinker/src/CXL_PeakPairFinder/PrecursorCrossPepFinder.java</file>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ public static void main(String[] args) throws FileNotFoundException, IOException
ArrayList<DIAPack> FileList = new ArrayList<>();

File folder = new File(WorkFolder);
if(!folder.exists()){
Logger.getRootLogger().info("The path : "+ WorkFolder + " cannot be found.");
System.exit(1);
}
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isFile() && (fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzxml") | fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzml"))
&& !fileEntry.getAbsolutePath().toLowerCase().endsWith("q1.mzxml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ public static void main(String[] args) throws FileNotFoundException, IOException
ArrayList<DIAPack> FileList = new ArrayList<>();
try {
File folder = new File(WorkFolder);
if(!folder.exists()){
Logger.getRootLogger().info("The path : "+ WorkFolder + " cannot be found.");
System.exit(1);
}
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isFile() && (fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzxml") | fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzml"))
&& !fileEntry.getAbsolutePath().toLowerCase().endsWith("q1.mzxml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public static void main(String[] args) throws FileNotFoundException, IOException
ArrayList<DIAPack> FileList = new ArrayList<>();

File folder = new File(WorkFolder);
if (!folder.exists()) {
Logger.getRootLogger().info("The path : " + WorkFolder + " cannot be found.");
System.exit(1);
}
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isFile() && (fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzxml") | fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzml"))
&& !fileEntry.getAbsolutePath().toLowerCase().endsWith("q1.mzxml")
Expand Down
3 changes: 3 additions & 0 deletions DIA_Umpire_ProtQuant/nbproject/private/private.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group name="DIA-Umpire_release"/>
<group name="MS_Umpire_Tsou">
<file>file:/C:/Umich/GitHub/DIA-Umpire/DIA_Umpire_ProtQuant/src/dia_umpire_quant/DIA_Umpire_ProtQuant.java</file>
</group>
<group name="DIA-Umpire_Release">
<file>file:/C:/Umich/GitHub/DIA-Umpire/DIA_Umpire_ProtQuant/src/dia_umpire_quant/DIA_Umpire_ProtQuant.java</file>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ public static void main(String[] args) throws FileNotFoundException, IOException
ArrayList<DIAPack> FileList = new ArrayList<>();
try {
File folder = new File(WorkFolder);
if(!folder.exists()){
Logger.getRootLogger().info("The path : "+ WorkFolder + " cannot be found.");
System.exit(1);
}
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isFile() && (fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzxml") | fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzml"))
&& !fileEntry.getAbsolutePath().toLowerCase().endsWith("q1.mzxml")
Expand Down
4 changes: 4 additions & 0 deletions DIA_Umpire_Quant/src/dia_umpire_quant/DIA_Umpire_Quant.java
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ public static void main(String[] args) throws FileNotFoundException, IOException
ArrayList<DIAPack> FileList = new ArrayList<>();
try {
File folder = new File(WorkFolder);
if(!folder.exists()){
Logger.getRootLogger().info("The path : "+ WorkFolder + " cannot be found.");
System.exit(1);
}
for (final File fileEntry : folder.listFiles()) {
if (fileEntry.isFile() && (fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzxml") | fileEntry.getAbsolutePath().toLowerCase().endsWith(".mzml"))
&& !fileEntry.getAbsolutePath().toLowerCase().endsWith("q1.mzxml")
Expand Down

0 comments on commit 0b18718

Please sign in to comment.