Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.util
Class GFileUtils

    java.lang.Object
      org.gradle.util.GFileUtils

    class GFileUtils
    extends java.lang.Object

author:
  Hans Dockter

Field Summary
`static java.lang.String` | `FILE_SEPARATOR`

Constructor Summary
`GFileUtils()`

Method Summary
`static void` | `addSubDirectories(java.io.File directory, java.util.Collection subDirectories)`
`static java.lang.String` | `byteCountToDisplaySize(long size)`
`static java.io.File` | `canonicalise(java.io.File src)`
`static Checksum` | `checksum(java.io.File file, Checksum checksum)`
`static long` | `checksumCRC32(java.io.File file)`
`static void` | `cleanDirectory(java.io.File directory)`
`static boolean` | `contentEquals(java.io.File file1, java.io.File file2)`
`static java.io.File[]` | `convertFileCollectionToFileArray(java.util.Collection files)`
`static void` | `copyDirectory(java.io.File srcDir, java.io.File destDir)`
`static void` | `copyDirectory(java.io.File srcDir, java.io.File destDir, boolean preserveFileDate)`
`static void` | `copyDirectory(java.io.File srcDir, java.io.File destDir, java.io.FileFilter filter)`
`static void` | `copyDirectory(java.io.File srcDir, java.io.File destDir, java.io.FileFilter filter, boolean preserveFileDate)`
`static void` | `copyDirectoryToDirectory(java.io.File srcDir, java.io.File destDir)`
`static void` | `copyFile(java.io.File srcFile, java.io.File destFile)`
`static void` | `copyFile(java.io.File srcFile, java.io.File destFile, boolean preserveFileDate)`
`static void` | `copyFileToDirectory(java.io.File srcFile, java.io.File destDir)`
`static void` | `copyFileToDirectory(java.io.File srcFile, java.io.File destDir, boolean preserveFileDate)`
`static void` | `copyURLToFile(URL source, java.io.File destination)`
`static boolean` | `createDirectoriesWhenNotExistent(java.io.File directories)`
`static void` | `deleteDirectory(java.io.File directory)`
`static boolean` | `deleteQuietly(java.io.File file)`
`static void` | `forceDelete(java.io.File file)`
`static void` | `forceDeleteOnExit(java.io.File file)`
`static void` | `forceMkdir(java.io.File directory)`
`static java.util.List` | `getSubDirectories(java.io.File directory)`
`static java.util.List` | `getSubFiles(java.io.File directory)`
`static boolean` | `isFileNewer(java.io.File file, java.io.File reference)`
`static boolean` | `isFileNewer(java.io.File file, java.util.Date date)`
`static boolean` | `isFileNewer(java.io.File file, long timeMillis)`
`static boolean` | `isFileOlder(java.io.File file, java.io.File reference)`
`static boolean` | `isFileOlder(java.io.File file, java.util.Date date)`
`static boolean` | `isFileOlder(java.io.File file, long timeMillis)`
`static java.util.Iterator` | `iterateFiles(java.io.File directory, IOFileFilter fileFilter, IOFileFilter dirFilter)`
`static java.util.Iterator` | `iterateFiles(java.io.File directory, java.lang.String[] extensions, boolean recursive)`
`static LineIterator` | `lineIterator(java.io.File file, java.lang.String encoding)`
`static LineIterator` | `lineIterator(java.io.File file)`
`static java.util.Collection` | `listFiles(java.io.File directory, IOFileFilter fileFilter, IOFileFilter dirFilter)`
`static java.util.Collection` | `listFiles(java.io.File directory, java.lang.String[] extensions, boolean recursive)`
`static void` | `moveDirectory(java.io.File srcDir, java.io.File destDir)`
`static void` | `moveDirectoryToDirectory(java.io.File src, java.io.File destDir, boolean createDestDir)`
`static void` | `moveFile(java.io.File srcFile, java.io.File destFile)`
`static void` | `moveFileToDirectory(java.io.File srcFile, java.io.File destDir, boolean createDestDir)`
`static void` | `moveToDirectory(java.io.File src, java.io.File destDir, boolean createDestDir)`
`static java.io.FileInputStream` | `openInputStream(java.io.File file)`
`static java.io.FileOutputStream` | `openOutputStream(java.io.File file)`
`static byte[]` | `readFileToByteArray(java.io.File file)`
`static java.lang.String` | `readFileToString(java.io.File file, java.lang.String encoding)`
`static java.lang.String` | `readFileToString(java.io.File file)`
`static java.util.List` | `readLines(java.io.File file, java.lang.String encoding)`
`static java.util.List` | `readLines(java.io.File file)`
`static long` | `sizeOfDirectory(java.io.File directory)`
`static java.io.File` | `toFile(java.lang.String filePathParts)`
`static java.io.File` | `toFile(URL url)`
`static java.io.File[]` | `toFiles(URL[] urls)`
`static URL[]` | `toURLs(java.io.File[] files)`
`static void` | `touch(java.io.File file)`
`static boolean` | `waitFor(java.io.File file, int seconds)`
`static void` | `writeByteArrayToFile(java.io.File file, byte[] data)`
`static void` | `writeLines(java.io.File file, java.lang.String encoding, java.util.Collection lines)`
`static void` | `writeLines(java.io.File file, java.util.Collection lines)`
`static void` | `writeLines(java.io.File file, java.lang.String encoding, java.util.Collection lines, java.lang.String lineEnding)`
`static void` | `writeLines(java.io.File file, java.util.Collection lines, java.lang.String lineEnding)`
`static void` | `writeStringToFile(java.io.File file, java.lang.String data, java.lang.String encoding)`
`static void` | `writeStringToFile(java.io.File file, java.lang.String data)`

Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll

Field Detail

### FILE_SEPARATOR

    static final java.lang.String FILE_SEPARATOR

Constructor Detail

### GFileUtils

    GFileUtils()

Method Detail

### addSubDirectories

    public static void addSubDirectories(java.io.File directory, java.util.Collection subDirectories)

### byteCountToDisplaySize

    public static java.lang.String byteCountToDisplaySize(long size)

### canonicalise

    public static java.io.File canonicalise(java.io.File src)

### checksum

    public static Checksum checksum(java.io.File file, Checksum checksum)

### checksumCRC32

    public static long checksumCRC32(java.io.File file)

### cleanDirectory

    public static void cleanDirectory(java.io.File directory)

### contentEquals

    public static boolean contentEquals(java.io.File file1, java.io.File file2)

### convertFileCollectionToFileArray

    public static java.io.File[] convertFileCollectionToFileArray(java.util.Collection files)

### copyDirectory

    public static void copyDirectory(java.io.File srcDir, java.io.File destDir)

### copyDirectory

    public static void copyDirectory(java.io.File srcDir, java.io.File destDir, boolean preserveFileDate)

### copyDirectory

    public static void copyDirectory(java.io.File srcDir, java.io.File destDir, java.io.FileFilter filter)

### copyDirectory

    public static void copyDirectory(java.io.File srcDir, java.io.File destDir, java.io.FileFilter filter, boolean preserveFileDate)

### copyDirectoryToDirectory

    public static void copyDirectoryToDirectory(java.io.File srcDir, java.io.File destDir)

### copyFile

    public static void copyFile(java.io.File srcFile, java.io.File destFile)

### copyFile

    public static void copyFile(java.io.File srcFile, java.io.File destFile, boolean preserveFileDate)

### copyFileToDirectory

    public static void copyFileToDirectory(java.io.File srcFile, java.io.File destDir)

### copyFileToDirectory

    public static void copyFileToDirectory(java.io.File srcFile, java.io.File destDir, boolean preserveFileDate)

### copyURLToFile

    public static void copyURLToFile(URL source, java.io.File destination)

### createDirectoriesWhenNotExistent

    public static boolean createDirectoriesWhenNotExistent(java.io.File directories)

### deleteDirectory

    public static void deleteDirectory(java.io.File directory)

### deleteQuietly

    public static boolean deleteQuietly(java.io.File file)

### forceDelete

    public static void forceDelete(java.io.File file)

### forceDeleteOnExit

    public static void forceDeleteOnExit(java.io.File file)

### forceMkdir

    public static void forceMkdir(java.io.File directory)

### getSubDirectories

    public static java.util.List getSubDirectories(java.io.File directory)

### getSubFiles

    public static java.util.List getSubFiles(java.io.File directory)

### isFileNewer

    public static boolean isFileNewer(java.io.File file, java.io.File reference)

### isFileNewer

    public static boolean isFileNewer(java.io.File file, java.util.Date date)

### isFileNewer

    public static boolean isFileNewer(java.io.File file, long timeMillis)

### isFileOlder

    public static boolean isFileOlder(java.io.File file, java.io.File reference)

### isFileOlder

    public static boolean isFileOlder(java.io.File file, java.util.Date date)

### isFileOlder

    public static boolean isFileOlder(java.io.File file, long timeMillis)

### iterateFiles

    public static java.util.Iterator iterateFiles(java.io.File directory, IOFileFilter fileFilter, IOFileFilter dirFilter)

### iterateFiles

    public static java.util.Iterator iterateFiles(java.io.File directory, java.lang.String[] extensions, boolean recursive)

### lineIterator

    public static LineIterator lineIterator(java.io.File file, java.lang.String encoding)

### lineIterator

    public static LineIterator lineIterator(java.io.File file)

### listFiles

    public static java.util.Collection listFiles(java.io.File directory, IOFileFilter fileFilter, IOFileFilter dirFilter)

### listFiles

    public static java.util.Collection listFiles(java.io.File directory, java.lang.String[] extensions, boolean recursive)

### moveDirectory

    public static void moveDirectory(java.io.File srcDir, java.io.File destDir)

### moveDirectoryToDirectory

    public static void moveDirectoryToDirectory(java.io.File src, java.io.File destDir, boolean createDestDir)

### moveFile

    public static void moveFile(java.io.File srcFile, java.io.File destFile)

### moveFileToDirectory

    public static void moveFileToDirectory(java.io.File srcFile, java.io.File destDir, boolean createDestDir)

### moveToDirectory

    public static void moveToDirectory(java.io.File src, java.io.File destDir, boolean createDestDir)

### openInputStream

    public static java.io.FileInputStream openInputStream(java.io.File file)

### openOutputStream

    public static java.io.FileOutputStream openOutputStream(java.io.File file)

### readFileToByteArray

    public static byte[] readFileToByteArray(java.io.File file)

### readFileToString

    public static java.lang.String readFileToString(java.io.File file, java.lang.String encoding)

### readFileToString

    public static java.lang.String readFileToString(java.io.File file)

### readLines

    public static java.util.List readLines(java.io.File file, java.lang.String encoding)

### readLines

    public static java.util.List readLines(java.io.File file)

### sizeOfDirectory

    public static long sizeOfDirectory(java.io.File directory)

### toFile

    public static java.io.File toFile(java.lang.String filePathParts)

### toFile

    public static java.io.File toFile(URL url)

### toFiles

    public static java.io.File[] toFiles(URL[] urls)

### toURLs

    public static URL[] toURLs(java.io.File[] files)

### touch

    public static void touch(java.io.File file)

### waitFor

    public static boolean waitFor(java.io.File file, int seconds)

### writeByteArrayToFile

    public static void writeByteArrayToFile(java.io.File file, byte[] data)

### writeLines

    public static void writeLines(java.io.File file, java.lang.String encoding, java.util.Collection lines)

### writeLines

    public static void writeLines(java.io.File file, java.util.Collection lines)

### writeLines

    public static void writeLines(java.io.File file, java.lang.String encoding, java.util.Collection lines, java.lang.String lineEnding)

### writeLines

    public static void writeLines(java.io.File file, java.util.Collection lines, java.lang.String lineEnding)

### writeStringToFile

    public static void writeStringToFile(java.io.File file, java.lang.String data, java.lang.String encoding)

### writeStringToFile

    public static void writeStringToFile(java.io.File file, java.lang.String data)

Groovy Documentation