def METHOD_NAME(self, path):
    p = ((len(path) > 1) and os.path.join(path) or path)
    if os.path.exists(p) and os.path.isfile(p):
        self._temp_files.append(p)
    elif os.path.exists(p) and os.path.isdir(p):
        self._temp_dirs.append(p)
    else:
        raise ValueError("File doesn't exist or not the right type")