GFileUtils

open class GFileUtils(source)

Deprecated

This class is only here to maintain binary compatibility with existing plugins.

Plugins should prefer java.io, java.nio or external packages over this class.

Deprecated

Will be removed in Gradle 9.0.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
Tail reading exception.

Functions

Link copied to clipboard
open fun checksum(file: File, checksum: Checksum): Checksum
Link copied to clipboard
open fun copyDirectory(source: File, destination: File)
Link copied to clipboard
open fun copyFile(source: File, destination: File)
If the destination file exists, then this method will overwrite it.
Link copied to clipboard
open fun copyURLToFile(source: URL, destination: File)
Link copied to clipboard
open fun deleteDirectory(directory: File)
Link copied to clipboard
open fun deleteQuietly(@Nullable file: File): Boolean
Link copied to clipboard
open fun forceDelete(file: File)
Link copied to clipboard
open fun listFiles(directory: File, extensions: Array<String>, recursive: Boolean): Collection<File>
Link copied to clipboard
open fun mkdirs(dir: File)
Like mkdirs, except throws an informative error if a dir cannot be created.
Link copied to clipboard
open fun moveDirectory(source: File, destination: File)
Link copied to clipboard
open fun moveExistingDirectory(source: File, destination: File)
Link copied to clipboard
open fun moveExistingFile(source: File, destination: File)
Link copied to clipboard
open fun moveFile(source: File, destination: File)
Link copied to clipboard
Link copied to clipboard
open fun parentMkdirs(child: File): File
Makes the parent directory of the file, and any non existent parents.
Link copied to clipboard
open fun readFile(file: File): String
open fun readFile(file: File, encoding: String): String
Link copied to clipboard
open fun readFileQuietly(file: File): String
Reads and returns file contents.
Link copied to clipboard
open fun relativePathOf(target: File, base: File): String
Returns the path of target relative to base.
Link copied to clipboard
open fun tail(file: File, maxLines: Int): String
Returns the tail of a file.
Link copied to clipboard
open fun toPaths(files: Collection<File>): List<String>
Link copied to clipboard
open fun touch(file: File)
Ensures that the given file (or directory) is marked as modified.
Link copied to clipboard
open fun touchExisting(file: File)
Ensures that the given file (or directory) is marked as modified.
Link copied to clipboard
open fun writeFile(content: String, destination: File)
open fun writeFile(content: String, destination: File, encoding: String)