MCPcopy Create free account
hub / github.com/ReZeroS/git / getFileAsString

Method getFileAsString

src/main/java/club/qqtim/util/FileUtil.java:114–121  ·  view source on GitHub ↗
(String path, String type)

Source from the content-addressed store, hash-verified

112
113
114 public static String getFileAsString(String path, String type) {
115 try {
116 return getFileByteSource(path, type).asCharSource(Charsets.UTF_8).read();
117 } catch (IOException e) {
118 log.error(e.toString());
119 }
120 return null;
121 }
122
123 public static ByteSource getFileByteSource(String path, String type) throws IOException {
124 char nullChar = 0;

Callers 5

callMethod · 0.95
addFilesMethod · 0.95
writeTreeMethod · 0.95
runMethod · 0.95
getObjectAsStringMethod · 0.95

Calls 3

getFileByteSourceMethod · 0.95
errorMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected