MCPcopy
hub / github.com/google/guava / sizeIfKnown

Method sizeIfKnown

guava/src/com/google/common/io/Files.java:134–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132 }
133
134 @Override
135 public Optional<Long> sizeIfKnown() {
136 if (file.isFile()) {
137 return Optional.of(file.length());
138 } else {
139 return Optional.absent();
140 }
141 }
142
143 @Override
144 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