
Add opened file name to the main pane information label. Update screenshots Correct readme
19 lines
506 B
Java
19 lines
506 B
Java
package logiledus;
|
|
|
|
import java.nio.file.Files;
|
|
import java.nio.file.Path;
|
|
import java.nio.file.Paths;
|
|
|
|
public class FilesValidator {
|
|
public static String validate(String fileAbsolutePath){
|
|
try{
|
|
Path locationAsPath = Paths.get(fileAbsolutePath);
|
|
if (Files.notExists(locationAsPath) || Files.isDirectory(locationAsPath))
|
|
return "";
|
|
return fileAbsolutePath;
|
|
}
|
|
catch (Exception ignored){
|
|
return "";
|
|
}
|
|
}
|
|
}
|