Also, this whole block is possible to do in a more Scala-istic way:

    path match {
      case p if (Files.isSymbolicLink(p)) => SymLinkType()
      case p if (Files.isDirectory(p)) => FolderType()
      case p if (Files.isRegularFile(p)) => FileType()
      case _ => throw new Exception("wierd error. path (${file.toURI}) is not a file, a directory or a symlink", null)
    }