MCPcopy Create free account
hub / github.com/antlr/codebuff / sizeIfKnown

Method sizeIfKnown

corpus/java/training/guava/io/Files.java:124–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122 }
123
124 @Override
125 public Optional<Long> sizeIfKnown() {
126 if (file.isFile()) {
127 return Optional.of(file.length());
128 } else {
129 return Optional.absent();
130 }
131 }
132
133 @Override
134 public long size() throws IOException {

Callers

nothing calls this directly

Calls 4

ofMethod · 0.95
absentMethod · 0.95
isFileMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected