Package org.frankframework.util
Class FileUtils
java.lang.Object
org.frankframework.util.FileUtils
Utilities for batch file handling.
- Author:
- John Dekker
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
static File
Creates a temporary file inside the ${ibis.tmpdir} using the default '.tmp' extension.static File
createTempFile
(String extension) Creates a temporary file inside the ${ibis.tmpdir} using the specified extension.static String
getBaseName
(String fileName) static String
getFilename
(ParameterList definedParameters, PipeLineSession session, File originalFile, String filenamePattern) static String
getFileNameExtension
(String fileName) static File[]
static File
getFreeFile
(File file) static String
If the ${ibis.tmpdir} is relative it will turn it into an absolute pathstatic File
getTempDirectory
(String folder) protected static void
makeBackups
(File targetFile, int numBackups) static String
moveFile
(File orgFile, File rename2File, boolean overwrite, int numBackups, int numberOfAttempts, long waitTime) static String
static boolean
readAllowed
(String rules, String fileName, FileUtils.Authenticator authenticator)
-
Constructor Details
-
FileUtils
public FileUtils()
-
-
Method Details
-
getFilename
public static String getFilename(ParameterList definedParameters, PipeLineSession session, File originalFile, String filenamePattern) throws ParameterException - Throws:
ParameterException
-
moveFile
public static String moveFile(File orgFile, File rename2File, boolean overwrite, int numBackups, int numberOfAttempts, long waitTime) throws InterruptedException, IOException - Throws:
InterruptedException
IOException
-
moveFile
public static String moveFile(File orgFile, File rename2File, int numberOfAttempts, long waitTime) throws InterruptedException - Throws:
InterruptedException
-
getFreeFile
-
copyFile
-
createTempFile
Creates a temporary file inside the ${ibis.tmpdir} using the default '.tmp' extension.- Throws:
IOException
-
createTempFile
Creates a temporary file inside the ${ibis.tmpdir} using the specified extension.- Throws:
IOException
-
getTempDirectory
If the ${ibis.tmpdir} is relative it will turn it into an absolute path- Returns:
- The absolute path of ${ibis.tmpdir} or IOException if it cannot be resolved
-
getTempDirectory
- Returns:
- the ${ibis.tmpdir}/folder or IOException if it cannot be resolved. If the ${ibis.tmpdir} is relative it will turn it into an absolute path
- Throws:
IOException
-
makeBackups
-
getFiles
-
getFileNameExtension
-
getBaseName
-
readAllowed
public static boolean readAllowed(String rules, String fileName, FileUtils.Authenticator authenticator)
-