MCPcopy Create free account
hub / github.com/breck7/scroll / getParentFolder

Method getParentFolder

external/.scrollLibs.js:14254–14257  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

14252 return Object.values(rows)
14253 }
14254 static getParentFolder(path) {
14255 if (path.endsWith("/")) path = this._removeLastSlash(path)
14256 return path.replace(/\/[^\/]*$/, "") + "/"
14257 }
14258 static _removeLastSlash(path) {
14259 return path.replace(/\/$/, "")
14260 }

Callers

nothing calls this directly

Calls 2

_removeLastSlashMethod · 0.95
replaceMethod · 0.80

Tested by

no test coverage detected