Package org.gradle.util
Klasse GFileUtils
java.lang.Object
org.gradle.util.GFileUtils
Veraltet.
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.
-
Verschachtelte Klassen - Übersicht
Verschachtelte Klassen -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic ChecksumVeraltet.static voidcopyDirectory(File source, File destination) Veraltet.static voidVeraltet.If the destination file exists, then this method will overwrite it.static voidcopyURLToFile(URL source, File destination) Veraltet.static voiddeleteDirectory(File directory) Veraltet.static booleandeleteQuietly(File file) Veraltet.static voidforceDelete(File file) Veraltet.static Collection<File> Veraltet.static voidVeraltet.LikeFile.mkdirs(), except throws an informative error if a dir cannot be created.static voidmoveDirectory(File source, File destination) Veraltet.static voidmoveExistingDirectory(File source, File destination) Veraltet.static voidmoveExistingFile(File source, File destination) Veraltet.static voidVeraltet.static FileInputStreamopenInputStream(File file) Veraltet.static FileparentMkdirs(File child) Veraltet.Makes the parent directory of the file, and any non existent parents.static StringVeraltet.static StringVeraltet.static StringreadFileQuietly(File file) Veraltet.Reads and returns file contents.static StringrelativePathOf(File target, File base) Veraltet.Returns the path of target relative to base.static StringVeraltet.Returns the tail of a file.toPaths(Collection<File> files) Veraltet.static voidVeraltet.Ensures that the given file (or directory) is marked as modified.static voidtouchExisting(File file) Veraltet.Ensures that the given file (or directory) is marked as modified.static voidVeraltet.static voidVeraltet.
-
Konstruktordetails
-
GFileUtils
public GFileUtils()Veraltet.
-
-
Methodendetails
-
openInputStream
Veraltet. -
touch
Veraltet.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
Veraltet.Ensures that the given file (or directory) is marked as modified. The file (or directory) must exist. -
moveFile
Veraltet. -
moveExistingFile
Veraltet. -
copyFile
Veraltet.If the destination file exists, then this method will overwrite it.- Siehe auch:
-
copyDirectory
Veraltet. -
moveDirectory
Veraltet. -
moveExistingDirectory
Veraltet. -
readFile
Veraltet. -
readFile
Veraltet. -
readFileQuietly
Veraltet.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.- Parameter:
file- to read- Gibt zurück:
- content of the file or the problem description in case file cannot be read.
-
writeFile
Veraltet. -
writeFile
Veraltet. -
listFiles
Veraltet. -
toPaths
Veraltet. -
copyURLToFile
Veraltet. -
deleteDirectory
Veraltet. -
deleteQuietly
Veraltet. -
tail
Veraltet.Returns the tail of a file.- Parameter:
file- to read from tailmaxLines- max lines to read- Gibt zurück:
- tail content
- Löst aus:
GFileUtils.TailReadingException- when reading failed
-
forceDelete
Veraltet. -
checksum
Veraltet. -
parentMkdirs
Veraltet.Makes the parent directory of the file, and any non existent parents.- Parameter:
child- The file to create the parent dir for- Gibt zurück:
- The parent dir file
- Siehe auch:
-
mkdirs
Veraltet.LikeFile.mkdirs(), except throws an informative error if a dir cannot be created.- Parameter:
dir- The dir to create, including any non existent parent dirs.
-
relativePathOf
Veraltet.Returns the path of target relative to base.- Parameter:
target- target file or directorybase- base directory- Gibt zurück:
- the path of target relative to base.
-