def METHOD_NAME(self):
    mode = None
    # a mode specification starting with '-' would cause the getopt parser to throw an error
    # therefore, remove the first such argument self.args before parsing with getopt
    args_new = []
    for arg in self.args:
        if not mode and arg.startswith("-") and re.fullmatch(MODE_REGEX, arg):
            mode = arg
        else:
            args_new.append(arg)
    # parse the command line options with getopt
    try:
        opts, args = getopt.gnu_getopt(
            args_new,
            "cfvR",
            [
                "changes",
                "silent",
                "quiet",
                "verbose",
                "no-preserve-root",
                "preserve-root",
                "reference=",
                "recursive",
                "help",
                "version",
            ],
        )
    except getopt.GetoptError as err:
        failed_opt = err.msg.split(" ")[1]
        if failed_opt.startswith("--"):
            self.errorWrite(
                f"chmod: unrecognized option '--{err.opt}'\n" + TRY_CHMOD_HELP_MSG
            )
        else:
            self.errorWrite(
                f"chmod: invalid option -- '{err.opt}'\n" + TRY_CHMOD_HELP_MSG
            )
        return [], None, [], True
    # if mode was not found before, use the first arg as mode
    if not mode and len(args) > 0:
        mode = args.pop(0)
    # the rest of args should be files
    files = args
    return opts, mode, files, False