Added license and copyright notice.
[instantlauncher.git] / src / main / java / eu / svjatoslav / instantlauncher / configuration / Configuration.java
index 04713c5..264f3cd 100644 (file)
@@ -1,8 +1,31 @@
+/*
+ * Instantlauncher. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
+ */
+
 package eu.svjatoslav.instantlauncher.configuration;
 
+import java.io.File;
 import java.util.Set;
 
 public class Configuration {
     public Set<FileAssociation> fileAssociations;
     public String navigationRootPath;
+    public String directoryOpenCommand;
+    public String directoryTerminalOpenCommand;
+
+    public FileAssociation findFileAssociation(File file) {
+        for (FileAssociation association : fileAssociations)
+            if (association.matchesFile(file)) return association;
+
+        return null;
+    }
+
+    public File getNavigationRootDirectory() {
+        return new File(navigationRootPath);
+    }
+
 }