MCPcopy Create free account
hub / github.com/AI45Lab/Code / list_prefix_for

Method list_prefix_for

core/src/workspace/s3.rs:409–421  ·  view source on GitHub ↗
(&self, path: &WorkspacePath)

Source from the content-addressed store, hash-verified

407 }
408
409 fn list_prefix_for(&self, path: &WorkspacePath) -> String {
410 if path.is_root() {
411 if self.prefix.is_empty() {
412 String::new()
413 } else {
414 format!("{}/", self.prefix)
415 }
416 } else if self.prefix.is_empty() {
417 format!("{}/", path.as_str())
418 } else {
419 format!("{}/{}/", self.prefix, path.as_str())
420 }
421 }
422
423 /// Shared GET path used by both [`WorkspaceFileSystem::read_text`] and
424 /// [`WorkspaceFileSystemExt::read_text_with_version`].

Callers 3

list_dirMethod · 0.80
list_recursive_underMethod · 0.80
grepMethod · 0.80

Calls 2

is_rootMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected