FileUtil

getFileExtension

Description...

FileUtil.getFileExtension(String fileName)

Parameters

fileName

Returns

String

copyFile

Description...

FileUtil.copyFile(File in, File out)

Parameters

in
out

Returns

None

renameTo

Description...

renameTo.renameTo(File fromFile, File toFile)

Parameters

fromFile
toFile

Returns

None

readFile

Scans through a file and reads all the lines

FileUtil.readFile(File file, int numberOfLines)

Parameters

file
numberOfLines

Returns

StringBuilder

writeFile

Description...

FileUtil.writeFile(File file, String buf)

or

FileUtil.writeFile(File file, byte[] bytes)

Parameters

file
buf
bytes

Returns

None

getFileTimestamp

Description...

FileUtil.getFileTimestamp(File f)

Parameters

inputFile

Returns

long

isFileModifiedBefore

Checks if the file was modified before the provided timestamp

FileUtil.isFileModifiedBefore(File f, long ts)

Parameters

inputFile
Timestamp

Parameters

True if the file was modified or False otherwise

isFileModifiedBeforeDelta

Description...

FileUtil.isFileModifiedBeforeDelta(File f, long ts, long delta)

Parameters

inputFile
Timestamp
delta

Returns

boolean

getFileBufferedReader

Description...

FileUtil.getFileBufferedReader(File file)

Parameters

inputFile

Returns

BufferedReader

getUniqueFileName

Description...

FileUtil.getUniqueFileName(String dirName, String fileName)
or
FileUtil.(String dirName, String fileNamePrefix, String ext)

Parameters

dirName
fileName
fileNamePrefix
ext

Returns

String

getFileList

Description...

FileUtil.getFileList(String path, String fileExtensions)

Parameters

path
fileExtensions

Returns

List<File>

getFileListNonRecursive

Description...

FileUtil.getFileListNonRecursive(String path, String[] extensions)

Parameters

path
extensions

Returns

List<File>

getFile

Description...

FileUtil.getFile(File file)

Parameters

file

Returns

Resource

copyTextFile

Description...

FileUtil.copyTextFile(File file1, File file2)

Parameters

file1
file2

Returns

None

isResizableImageFile

Description...

FileUtil.isResizableImageFile(String fileName)

Parameters

fileName

Returns

boolean

getSupportedFileTypes

Description...

FileUtil.getSupportedFileTypes()

Parameters

None

Returns

String

RemoveTemp

Description...

FileUtil.RemoveTemp(File workDir)

Parameters

workDir

Returns

boolean

RemoveTemp

Description...

FileUtil.RemoveTemp(File workDir)

Parameters

workDir

Returns

boolean

RemoveTemp

Description...

FileUtil.RemoveTemp(File workDir)

Parameters

workDir

Returns

boolean

takeOffBOM

Description...

FileUtil.takeOffBOM(String str)

Parameters

str

Returns

String

listDirectory

Description...

FileUtil.listDirectory(String repoRoot, File directory,
      int timeLimit)

Parameters

repoRoot
directory
timeLimit

Returns

List<Map<String, Object>>

listDirectory

Description...

FileUtil.validateFilePath(File file)

Parameters

file

Returns

None

validateFilePath

Description...

FileUtil.validateFilePath(String parent, File file)

Parameters

parent
file

Returns

None

validateFilePath

Description...

validateFilePath(String parentDir, File file)

Parameters

parentDir
file

Returns

None

Last updated