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

Function strip_file_name

core/src/workspace/s3.rs:1042–1049  ·  view source on GitHub ↗
(key: &str, listing_prefix: &str)

Source from the content-addressed store, hash-verified

1040}
1041
1042fn strip_file_name(key: &str, listing_prefix: &str) -> Option<String> {
1043 let remainder = key.strip_prefix(listing_prefix)?;
1044 if remainder.is_empty() || remainder.contains('/') {
1045 None
1046 } else {
1047 Some(remainder.to_string())
1048 }
1049}
1050
1051fn classify_get_error<E>(bucket: &str, key: &str, error: SdkError<E>) -> WorkspaceError
1052where

Callers 1

list_dirMethod · 0.85

Calls 2

containsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected