pub fn read_content_filepath_or_stdin(arg: Option<String>) -> Vec<u8> ⓘ
Expand description
Reads the arg and returns a vector of bytes
These are the rules
- If None, stdin is read.
- If it’s a String and it happens to be a file path, its content will be returned
- If it’s a String and it is “-”, stdin is read
- If the string starts with “0x”, it will be treated as a hex string. Only fully valid hex strings are accepted.
- Otherwise the String will be converted to a vector of bytes