MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / process_name_from_command

Function process_name_from_command

packages/server/src/performance.rs:632–644  ·  view source on GitHub ↗
(command: &str)

Source from the content-addressed store, hash-verified

630}
631
632fn process_name_from_command(command: &str) -> String {
633 let executable = command
634 .split_whitespace()
635 .next()
636 .unwrap_or(command)
637 .trim_matches('"');
638 Path::new(executable)
639 .file_name()
640 .and_then(|name| name.to_str())
641 .filter(|name| !name.is_empty())
642 .unwrap_or("unknown")
643 .to_owned()
644}
645
646fn app_bundle_path_from_command(command: &str) -> Option<String> {
647 let marker = if command.contains(".app/") {

Callers 2

performance_processFunction · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected