Skip to main content

is_valid_key

Function is_valid_key 

Source
pub fn is_valid_key(key: &str) -> bool
Expand description

Whether key follows the rules for a key: 1 to MAX_KEY_BYTES bytes of lower case ASCII letters, digits, -, _ and ., not starting with ..

Lower case only so two keys never become one file on a file system that ignores case, which is the default on macOS and Windows. The key is the file name as it is, so nothing that a path would read as a separator or a parent is allowed.