Package org.gradle.util
Class GFileUtils
java.lang.Object
org.gradle.util.GFileUtils
Deprecated.
Will be removed in Gradle 9.0.
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ChecksumDeprecated.static voidcopyDirectory(File source, File destination) Deprecated.static voidDeprecated.If the destination file exists, then this method will overwrite it.static voidcopyURLToFile(URL source, File destination) Deprecated.static voiddeleteDirectory(File directory) Deprecated.static booleandeleteQuietly(File file) Deprecated.static voidforceDelete(File file) Deprecated.static Collection<File> Deprecated.static voidDeprecated.LikeFile.mkdirs(), except throws an informative error if a dir cannot be created.static voidmoveDirectory(File source, File destination) Deprecated.static voidmoveExistingDirectory(File source, File destination) Deprecated.static voidmoveExistingFile(File source, File destination) Deprecated.static voidDeprecated.static FileInputStreamopenInputStream(File file) Deprecated.static FileparentMkdirs(File child) Deprecated.Makes the parent directory of the file, and any non existent parents.static StringDeprecated.static StringDeprecated.static StringreadFileQuietly(File file) Deprecated.Reads and returns file contents.static StringrelativePathOf(File target, File base) Deprecated.Returns the path of target relative to base.static StringDeprecated.Returns the tail of a file.toPaths(Collection<File> files) Deprecated.static voidDeprecated.Ensures that the given file (or directory) is marked as modified.static voidtouchExisting(File file) Deprecated.Ensures that the given file (or directory) is marked as modified.static voidDeprecated.static voidDeprecated.
-
Constructor Details
-
GFileUtils
public GFileUtils()Deprecated.
-
-
Method Details
-
openInputStream
Deprecated. -
touch
Deprecated.Ensures that the given file (or directory) is marked as modified. If the file (or directory) does not exist, a new file is created. -
touchExisting
Deprecated.Ensures that the given file (or directory) is marked as modified. The file (or directory) must exist. -
moveFile
Deprecated. -
moveExistingFile
Deprecated. -
copyFile
Deprecated.If the destination file exists, then this method will overwrite it.- See Also:
-
copyDirectory
Deprecated. -
moveDirectory
Deprecated. -
moveExistingDirectory
Deprecated. -
readFile
Deprecated. -
readFile
Deprecated. -
readFileQuietly
Deprecated.Reads and returns file contents. If some exception is triggered the method returns information about this exception. Useful for including file contents in debug trace / exception messages.- Parameters:
file- to read- Returns:
- content of the file or the problem description in case file cannot be read.
-
writeFile
Deprecated. -
writeFile
Deprecated. -
listFiles
Deprecated. -
toPaths
Deprecated. -
copyURLToFile
Deprecated. -
deleteDirectory
Deprecated. -
deleteQuietly
Deprecated. -
tail
Deprecated.Returns the tail of a file.- Parameters:
file- to read from tailmaxLines- max lines to read- Returns:
- tail content
- Throws:
GFileUtils.TailReadingException- when reading failed
-
forceDelete
Deprecated. -
checksum
Deprecated. -
parentMkdirs
Deprecated.Makes the parent directory of the file, and any non existent parents.- Parameters:
child- The file to create the parent dir for- Returns:
- The parent dir file
- See Also:
-
mkdirs
Deprecated.LikeFile.mkdirs(), except throws an informative error if a dir cannot be created.- Parameters:
dir- The dir to create, including any non existent parent dirs.
-
relativePathOf
Deprecated.Returns the path of target relative to base.- Parameters:
target- target file or directorybase- base directory- Returns:
- the path of target relative to base.
-