Skip to main content

parse_input_filename

Function parse_input_filename 

Source
pub fn parse_input_filename<'a>(
    output_buf: &'a mut [u8; 64],
    input_name: &str,
    category: FileCategory,
) -> Result<&'a str>
Expand description

Parses a filename from an input string, applying default path and extension.

This function uses cFE’s logic to construct a complete, platform-correct file path. If the input_name omits a path or extension, defaults appropriate for the category are applied.

§Arguments

  • output_buf: A buffer to store the resulting fully-qualified path.
  • input_name: The (potentially partial) filename to parse.
  • category: The FileCategory which determines the default path and extension.

§Returns

On success, returns a &str slice of the valid, null-terminated path within output_buf.