def single_file_action(self, path, apply_template=True):
        attempt_open = True
        file_exist = os.path.exists(path)
        if not file_exist:
            try:
                self.create(path)
            except __HOLE__ as e:
                attempt_open = False
                sublime.error_message("Cannot create '" + path +
                                      "'. See console for details")
                print("Exception: %s '%s'" % (e.strerror, e.filename))
        if attempt_open and os.path.isfile(path):
            file_view = self.open_file(path)
            if not file_exist and apply_template:
                file_view.settings().set("_anf_new", True)
dataset/ETHPy150Open skuroda/Sublime-AdvancedNewFile/advanced_new_file/commands/new_file_command.py/AdvancedNewFileNew.single_file_action