Org.gradle.api.file vs java.io.File

buildship
plugins

(Sanchez) #1

Hi All experts,

what is the difference between org.gradle.api.file and java.io.File? What would be the advantage of using org.gradle.api.file? would it be faster?


(Chris Doré) #2

org.gradle.api.file is a package, not a class, so comparing it to Java’s File class doesn’t make sense. Can you describe a bit more about what you’re referring to?


(Sanchez) #3

Hi Dore,
Sorry. i even did not noticed it is a package. Actually i want to know for file operation like delete file/create directory, should we use file from java.io or should we use gradle api like org.gradle.file.*? would gradle’s api be faster or it has other advantage?