java.lang.Object
de.edgesoft.edgeutils.files.FileUtils
public class FileUtils
extends java.lang.Object
Class file utilities.
Legal stuff
Copyright 2010-2020 Ekkart Kleinod ekleinod@edgesoft.de
This file is part of edgeutils.
edgeutils is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
edgeutils is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with edgeutils. If not, see http://www.gnu.org/licenses/.
- Since:
- 0.9.7
- Author:
- Ekkart Kleinod
-
Constructor Summary
Constructors Constructor Description FileUtils() -
Method Summary
Modifier and Type Method Description static java.lang.StringcleanFilename(java.lang.String theFilename)Returns a clean, special character free filename.static java.lang.StringcleanFilename(java.lang.String theFilename, boolean convertUmlauts)Returns a clean filename, i.e.static booleanexistsFile(java.lang.String thePath, java.lang.String theFilename)Returns if file given by path and filename exists.static booleanexistsFile(java.lang.String thePath, javafx.beans.property.StringProperty theFilename)Returns if file given by path and filename exists.
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
cleanFilename
public static java.lang.String cleanFilename(java.lang.String theFilename)Returns a clean, special character free filename.- Parameters:
theFilename- the file name- Returns:
- cleaned filename
-
cleanFilename
public static java.lang.String cleanFilename(java.lang.String theFilename, boolean convertUmlauts)Returns a clean filename, i.e. free of special characters.- Parameters:
theFilename- the file nameconvertUmlauts- convert umlauts too?- Returns:
- cleaned filename
- Since:
- 0.11.0
-
existsFile
public static boolean existsFile(java.lang.String thePath, javafx.beans.property.StringProperty theFilename)Returns if file given by path and filename exists.- Parameters:
thePath- paththeFilename- filename- Returns:
- does file exist?
- Since:
- 0.11.0
-
existsFile
public static boolean existsFile(java.lang.String thePath, java.lang.String theFilename)Returns if file given by path and filename exists.- Parameters:
thePath- paththeFilename- filename- Returns:
- does file exist?
- Since:
- 0.11.0
-