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 SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
GFileUtilspublic GFileUtils()Deprecated.
 
- 
- 
Method Details- 
openInputStreamDeprecated.
- 
touchDeprecated.Ensures that the given file (or directory) is marked as modified. If the file (or directory) does not exist, a new file is created.
- 
touchExistingDeprecated.Ensures that the given file (or directory) is marked as modified. The file (or directory) must exist.
- 
moveFileDeprecated.
- 
moveExistingFileDeprecated.
- 
copyFileDeprecated.If the destination file exists, then this method will overwrite it.- See Also:
 
- 
copyDirectoryDeprecated.
- 
moveDirectoryDeprecated.
- 
moveExistingDirectoryDeprecated.
- 
readFileDeprecated.
- 
readFileDeprecated.
- 
readFileQuietlyDeprecated.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.
 
- 
writeFileDeprecated.
- 
writeFileDeprecated.
- 
listFilesDeprecated.
- 
toPathsDeprecated.
- 
copyURLToFileDeprecated.
- 
deleteDirectoryDeprecated.
- 
deleteQuietlyDeprecated.
- 
tailDeprecated.Returns the tail of a file.- Parameters:
- file- to read from tail
- maxLines- max lines to read
- Returns:
- tail content
- Throws:
- GFileUtils.TailReadingException- when reading failed
 
- 
forceDeleteDeprecated.
- 
checksumDeprecated.
- 
parentMkdirsDeprecated.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:
 
- 
mkdirsDeprecated.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.
 
- 
relativePathOfDeprecated.Returns the path of target relative to base.- Parameters:
- target- target file or directory
- base- base directory
- Returns:
- the path of target relative to base.
 
 
-