package src;

import java.io.File;
import java.nio.file.Path;

public class FileSystemWorker {
    public static String GetExtension(String path){
        int sepPos = path.lastIndexOf(File.separator);
        String nameAndExt = path.substring(sepPos + 1, path.length());
        int dotPos = nameAndExt.lastIndexOf(".");
        return dotPos!=-1 ? nameAndExt.substring(dotPos + 1):"";
    }

    public static String GetUsename(Path path){

        return "...";
    }
}

@@ -7,16 +7,40 @@
 e src;%0A%0A
+import org.ini4j.Wini;%0A%0A
 import j
@@ -52,16 +52,44 @@
 o.File;%0A
+import java.io.IOException;%0A
 import j
@@ -140,16 +140,17 @@
 orker %7B%0A
+%0A
     publ
@@ -173,30 +173,49 @@
  Get
-Extension(String path)
+Param(String keyName) throws IOException 
 %7B%0A  
@@ -224,63 +224,69 @@
     
+W
 in
-t sepPos = path.lastIndexOf(File.separator
+i ini = new Wini(new File(%22tournamentset.ini%22)
 );%0A
+%0A
         
 Stri
@@ -285,184 +285,590 @@
     
-String nameAndExt = path.substring(sepPos + 1, path.length());%0A        int dotPos = nameAndExt.lastIndexOf(%22.%22);%0A        return dotPos!=-1 ? nameAndExt.substring(dotPos + 1):%22%22
+return ini.get(%22General%22, keyName);%0A    %7D%0A%0A    public static String GetDelimer()%7B%0A        if(System.getProperty(%22os.name%22).toLowerCase().indexOf(%22win%22) %3E= 0) //%D0%B5%D1%81%D0%BB%D0%B8 windows%0A            return %22%5C%5C%22;%0A%0A        if(System.getProperty(%22os.name%22).toLowerCase().indexOf(%22nux%22) %3E= 0 %7C%7C%0A                System.getProperty(%22os.name%22).toLowerCase().indexOf(%22nix%22) %3E= 0) //%D0%B5%D1%81%D0%BB%D0%B8 linux / unix%0A            return %22/%22;%0A%0A        return %22/%22;%0A    %7D%0A%0A    static String _delimer = GetDelimer();%0A%0A    public static String GetLang(Path path)%7B%0A        return path.getName(path.getNameCount() - 2).toString()
 ;%0A  
@@ -903,16 +903,17 @@
 g GetUse
+r
 name(Pat
@@ -919,19 +919,19 @@
 th path)
+ 
 %7B%0A
-%0A
         
@@ -941,13 +941,152 @@
 urn 
-%22...%22
+path.getName(path.getNameCount() - 3).toString();%0A    %7D%0A%0A    public static String GetRoot() throws IOException %7B%0A        return GetParam(%22Root%22)
 ;%0A  

Add some methods to detect user name, language from full path