Class FileUtils
- java.lang.Object
-
- net.ssehub.easy.basics.io.FileUtils
-
- net.ssehub.easy.producer.core.persistence.internal.util.FileUtils
-
public class FileUtils extends net.ssehub.easy.basics.io.FileUtilsSome basic file utilities.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description static charSEPARATORstatic java.lang.StringSEPARATOR_STRING
-
Constructor Summary
Constructors Modifier Constructor Description privateFileUtils()Prevents initialization of this utility class.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringfromIndependent(java.io.File file)Converts a file into a string using a system independent separator.static java.lang.StringfromIndependent(java.lang.String file)Converts a file into a string using a system independent separator.static java.lang.StringmakeAbsolute(java.io.File baseFolder, java.lang.String location)Makes a given location absolute if required.static java.io.FilemakeAbsoluteFile(java.io.File baseFolder, java.lang.String location)Makes a given location absolute if required.static java.lang.StringmakeRelative(java.io.File baseFolder, java.io.File location)Make alocationrelative tobaseFolderif possible.static java.io.FilemakeRelativeFile(java.io.File baseFolder, java.io.File location)Make alocationrelative tobaseFolderif possible.static java.lang.StringtoIndependent(java.lang.String file)Converts a string into a file using a system independent separator.static java.io.FiletoIndependentFile(java.lang.String file)Converts a string into a file using a system independent separator.
-
-
-
Field Detail
-
SEPARATOR
public static final char SEPARATOR
- See Also:
- Constant Field Values
-
SEPARATOR_STRING
public static final java.lang.String SEPARATOR_STRING
-
-
Method Detail
-
makeAbsoluteFile
public static final java.io.File makeAbsoluteFile(java.io.File baseFolder, java.lang.String location)Makes a given location absolute if required.- Parameters:
baseFolder- the base folder to be prepended if necessarylocation- the location to be made absolute- Returns:
- the absolute location
-
makeAbsolute
public static final java.lang.String makeAbsolute(java.io.File baseFolder, java.lang.String location)Makes a given location absolute if required.- Parameters:
baseFolder- the base folder to be prepended if necessarylocation- the location to be made absolute- Returns:
- the absolute location as String
-
makeRelative
public static final java.lang.String makeRelative(java.io.File baseFolder, java.io.File location)Make alocationrelative tobaseFolderif possible.- Parameters:
baseFolder- the base folderlocation- the location to be made relative- Returns:
- the relative location as String
-
makeRelativeFile
public static final java.io.File makeRelativeFile(java.io.File baseFolder, java.io.File location)Make alocationrelative tobaseFolderif possible.- Parameters:
baseFolder- the base folderlocation- the location to be made relative- Returns:
- the relative location as String
-
fromIndependent
public static final java.lang.String fromIndependent(java.lang.String file)
Converts a file into a string using a system independent separator.- Parameters:
file- the file to be converted- Returns:
- the converted string
-
fromIndependent
public static final java.lang.String fromIndependent(java.io.File file)
Converts a file into a string using a system independent separator.- Parameters:
file- the file to be converted- Returns:
- the converted string
-
toIndependentFile
public static final java.io.File toIndependentFile(java.lang.String file)
Converts a string into a file using a system independent separator.- Parameters:
file- the string to be converted- Returns:
- the converted file
-
toIndependent
public static final java.lang.String toIndependent(java.lang.String file)
Converts a string into a file using a system independent separator.- Parameters:
file- the string to be converted- Returns:
- the converted file name
-
-