MCPcopy Create free account
hub / github.com/alibaba/open-code-review / probeKind

Function probeKind

scripts/github-actions/check-plugin-contract.js:821–828  ·  view source on GitHub ↗
(repoRoot, repoPath)

Source from the content-addressed store, hash-verified

819}
820
821function probeKind(repoRoot, repoPath) {
822 try {
823 const stat = fs.statSync(path.join(repoRoot, repoPath));
824 return stat.isDirectory() ? "dir" : "file";
825 } catch (e) {
826 return null;
827 }
828}
829
830// Sorted names of the entries of `rel` whose resolved kind is `want`
831// ("dir" or "file"), or null if `rel` cannot be read.

Callers 2

runLinksCheckFunction · 0.85
runManifestsCheckFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected