Return an base64 encoded byte string as an ENCODING decoded string
Return a 2-tuple of sets. The first set in the 2-tuple contains directory names and the second set contains files names.
Example with an object_key of /static/. The leading slash from / get_dirs_and_files(‘/static/’, [‘static/css/ads.css’, ‘static/js/main.js’, ‘static/robots.txt’]) {‘css’, ‘js’} {‘robots.txt’}
Returns the given string converted to a string that can be used for a clean filename. Specifically, leading and trailing spaces are removed; other spaces are converted to underscores; and anything that is not a unicode alphanumeric, dash, underscore, or dot, is removed.
>>> get_valid_filename("john's portrait in 2004.jpg")
'johns_portrait_in_2004.jpg'