Use the '_file' module. It is an internal module that contains helper functionality for the builtin ``file`` type. .. internal