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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Checksum
Deprecated.static void
copyDirectory
(File source, File destination) Deprecated.static void
Deprecated.If the destination file exists, then this method will overwrite it.static void
copyURLToFile
(URL source, File destination) Deprecated.static void
deleteDirectory
(File directory) Deprecated.static boolean
deleteQuietly
(File file) Deprecated.static void
forceDelete
(File file) Deprecated.static Collection<File>
Deprecated.static void
Deprecated.LikeFile.mkdirs()
, except throws an informative error if a dir cannot be created.static void
moveDirectory
(File source, File destination) Deprecated.static void
moveExistingDirectory
(File source, File destination) Deprecated.static void
moveExistingFile
(File source, File destination) Deprecated.static void
Deprecated.static FileInputStream
openInputStream
(File file) Deprecated.static File
parentMkdirs
(File child) Deprecated.Makes the parent directory of the file, and any non existent parents.static String
Deprecated.static String
Deprecated.static String
readFileQuietly
(File file) Deprecated.Reads and returns file contents.static String
relativePathOf
(File target, File base) Deprecated.Returns the path of target relative to base.static String
Deprecated.Returns the tail of a file.toPaths
(Collection<File> files) Deprecated.static void
Deprecated.Ensures that the given file (or directory) is marked as modified.static void
touchExisting
(File file) Deprecated.Ensures that the given file (or directory) is marked as modified.static void
Deprecated.static void
Deprecated.
-
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:
-
FileUtils.copyFile(File, File)
-
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.
-