MCPcopy Create free account
hub / github.com/apache/solr / userForDir

Method userForDir

solr/core/src/java/org/apache/solr/cli/AssertTool.java:392–400  ·  view source on GitHub ↗
(Path pathToDir)

Source from the content-addressed store, hash-verified

390 }
391
392 public static String userForDir(Path pathToDir) {
393 try {
394 FileOwnerAttributeView ownerAttributeView =
395 Files.getFileAttributeView(pathToDir, FileOwnerAttributeView.class);
396 return ownerAttributeView.getOwner().getName();
397 } catch (IOException e) {
398 return "N/A";
399 }
400 }
401
402 private static int exitOrException(String msg) throws AssertionFailureException {
403 if (useExitCode) {

Callers 1

sameUserMethod · 0.95

Calls 2

getOwnerMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected