Skip to main content

parse_df_device

Function parse_df_device 

Source
pub fn parse_df_device(output: &str) -> Option<String>
Expand description

What: The mounted device node in POSIX df -P output: the first field of the last non-empty row that starts with /dev/ and holds only safe characters. Why: parseDfDevice on macOS.

In TS you’d write (pseudocode):

function parseDfDevice(output: string): string; // throws when none