@@ -0,0 +1,964 @@
+package org.rmatil.sync.client.validator;%0A%0Aimport org.rmatil.sync.client.exception.ValidationException;%0A%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0A%0Apublic class DirectoryValidator implements IValidator %7B%0A%0A    /**%0A     * The path to check whether it is a directory or not%0A     */%0A    protected String path;%0A%0A    /**%0A     * Checks if the given path is a directory%0A     *%0A     * @param path The path to check%0A     */%0A    public DirectoryValidator(String path) %7B%0A        this.path = path;%0A    %7D%0A%0A    @Override%0A    public boolean validate()%0A            throws ValidationException %7B%0A%0A        String resolvedPath = this.path.replaceFirst(%22%5E~%22, System.getProperty(%22user.home%22));%0A        Path pathToValidate = Paths.get(resolvedPath).toAbsolutePath();%0A%0A        if (! pathToValidate.toFile().exists()) %7B%0A            throw new ValidationException(%22Path %22 + this.path + %22 does not exist%22);%0A        %7D%0A%0A        return pathToValidate.toFile().isDirectory();%0A    %7D%0A%7D%0A

Add directory validator