public static FolderDataModel parse(String path) throws Folder2XmlException {
        File file = new File(path);

        List<FolderDataModel> innerFolders = new LinkedList<>();
        List<FileDataModel> innerFiles = new LinkedList<>();
        try {
            for (File innerFile : file.listFiles()) {
                if (innerFile.isDirectory()) {
                    innerFolders.add(parse(innerFile.getPath()));
                } else {
                    innerFiles.add(parseFile(innerFile));
                }
            }
        } catch (NullPointerException e) {
            throw new Folder2XmlException("Seems like path point to file(but folder expected)", e);
        }

        return new FolderDataModel(file.getName(), innerFolders, innerFiles);
    }