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

Method objectExists

src/main/java/club/qqtim/context/ZitContext.java:112–114  ·  view source on GitHub ↗

@param objectId object id @return true if the object exist

(String objectId)

Source from the content-addressed store, hash-verified

110 * @return true if the object exist
111 */
112 public static boolean objectExists(String objectId) {
113 return FileUtil.isFile(Paths.get(ConstantVal.OBJECTS_DIR).resolve(objectId).toString());
114 }
115
116 public static void fetchObjectIfMissing(String objectId, String remoteDir) {
117 if (objectExists(objectId)) {

Callers 1

fetchObjectIfMissingMethod · 0.95

Calls 2

isFileMethod · 0.95
toStringMethod · 0.45

Tested by

no test coverage detected