String helper functions from filesystem branch