use of org.gradle.internal.file.FileMetadataSnapshot in project gradle by gradle.
the class DefaultFileSystemSnapshotter method calculateDetails.
private FileSnapshot calculateDetails(File file) {
String path = internPath(file);
FileMetadataSnapshot stat = fileSystem.stat(file);
switch(stat.getType()) {
case Missing:
return new MissingFileSnapshot(path, new RelativePath(true, file.getName()));
case Directory:
return new DirectoryFileSnapshot(path, new RelativePath(false, file.getName()), true);
case RegularFile:
return new RegularFileSnapshot(path, new RelativePath(true, file.getName()), true, fileSnapshot(file, stat));
default:
throw new IllegalArgumentException("Unrecognized file type: " + stat.getType());
}
}
Aggregations