Package org.oddjob.io
Class FilesUtil
java.lang.Object
org.oddjob.io.FilesUtil
Utility methods for dealing with files.
- Author:
- Rob Gordon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic File[]Expand a file that could contain wild cards.static File[]Expand an array of files which could contain wildcards into an actual array of files.static voidverifyReadable(File[] files) Verify that all files are readable.static voidverifyWrite(File file) Verify that a file is writeable.static voidverifyWrite(File[] files) Verify that files are writeable.
-
Constructor Details
-
FilesUtil
public FilesUtil()
-
-
Method Details
-
expand
Expand a file that could contain wild cards.- Parameters:
file- The file.- Returns:
- An array of files. Never null.
- Throws:
IOException
-
expand
Expand an array of files which could contain wildcards into an actual array of files. The array will be sorted.- Parameters:
files- The in files.- Returns:
- The expanded files
- Throws:
IOException
-
verifyReadable
Verify that all files are readable.- Parameters:
files- The files.- Throws:
RuntimeException
-
verifyWrite
Verify that a file is writeable.- Parameters:
file- A file.- Throws:
RuntimeException
-
verifyWrite
Verify that files are writeable.- Parameters:
files- The files.- Throws:
RuntimeException
-