code: def from_file(cls, file_path, compressed=False, encoded=False):
          
          file_id = '.'.join(path.basename(file_path).split('.')[:-1])
          file_format = file_path.split('.')[-1]
          content = cls(file_id, file_format, compressed, encoded)
          content.file_exists = True
          content._location = path.dirname(file_path)
          return content
docs: Create a content object from a file path.