use of org.gradle.api.resources.ReadableResource in project gradle by gradle.
the class DefaultFileOperations method tarTree.
public FileTree tarTree(Object tarPath) {
File tarFile = null;
ReadableResourceInternal resource;
if (tarPath instanceof ReadableResourceInternal) {
resource = (ReadableResourceInternal) tarPath;
} else if (tarPath instanceof ReadableResource) {
// custom type
resource = new UnknownBackingFileReadableResource((ReadableResource) tarPath);
} else {
tarFile = file(tarPath);
resource = new LocalResourceAdapter(new LocalFileStandInExternalResource(tarFile, fileSystem));
}
TarFileTree tarTree = new TarFileTree(tarFile, new MaybeCompressedFileResource(resource), getExpandDir(), fileSystem, fileSystem, directoryFileTreeFactory, streamHasher);
return new FileTreeAdapter(tarTree, fileResolver.getPatternSetFactory());
}
Aggregations