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

Method normalizeDir

solr/core/src/java/org/apache/solr/core/SolrPaths.java:43–47  ·  view source on GitHub ↗

Ensures a directory name always ends with a '/'.

(String path)

Source from the content-addressed store, hash-verified

41
42 /** Ensures a directory name always ends with a '/'. */
43 public static String normalizeDir(String path) {
44 return (path != null && (!(path.endsWith("/") || path.endsWith("\\"))))
45 ? path + FileSystems.getDefault().getSeparator()
46 : path;
47 }
48
49 /**
50 * Checks that the given path is relative to one of the allowPaths supplied. Typically this will

Callers 2

findDataDirMethod · 0.95
ulogToTlogDirMethod · 0.95

Calls 1

getDefaultMethod · 0.45

Tested by

no test coverage detected