toDirectoryEntry

Extension function to convert String to a directory entry.