def __init__(self, casemode=0, countpos=0, dirsonly=False, exclude="",
                 filesonly=False, hidden=False, ignorecase=False,
                 interactive=False, keepext=False, mediamode=False,
                 noclobber=False, recursive=False, regex=False, remdups=False,
                 remext=False, remnonwords=False, remsymbols=False,
                 simulate=False, spacemode=0, quiet=False, verbosity=1,
                 matchpattern="", replacepattern="", recursivedepth=0):
        # Universal options:
        try:
            self._casemode = int(casemode)  # 0=lc, 1=uc, 2=flfw, 3=flew
        except TypeError:
            self._casemode = 0
        try:
            self._countpos = int(countpos)  # Adds numerical index at position.
        except TypeError:
            self._countpos = 0
        try:
            self._spacemode = int(spacemode)  # 0=su, 1=sh, 2=sd, 3=ds, 4=hs, 5=us
        except __HOLE__:
            self.spacemode = 0
        self._dirsonly = dirsonly  # Only edit directory names.
        self._filesonly = False if dirsonly else filesonly  # Only file names.
        self._hidden = hidden  # Look at hidden files and directories, too.
        self._ignorecase = ignorecase  # Case sensitivity.
        self._interactive = interactive  # Confirm before overwriting.
        self._keepext = keepext  # Don't modify remext.
        self._mediamode = mediamode  # Mode to sanitize NTFS-filenames/dirnames.
        self._noclobber = noclobber  # Don't overwrite anything.
        self._recursive = recursive  # Look for files recursively
        self._regex = regex  # Use regular expressions instead of glob/fnmatch.
        self._remdups = remdups  # Remove remdups.
        self._remext = remext  # Remove all remext.
        self._remnonwords = remnonwords  # Only allow wordchars (\w)
        self._remsymbols = remsymbols  # Normalize remsymbols (ñé becomes ne).
        self._simulate = simulate  # Simulate renaming and dump result to stdout.
        # Initialize GUI options.
        self._recursivedepth = recursivedepth
        self._excludeedit = "" if not exclude else exclude
        self._matchedit = "" if not matchpattern else matchpattern
        self._replaceedit = "" if not replacepattern else replacepattern
        self._autostop = False  # Automatically stop execution on rename error.
        self._countbase = 1  # Base to start counting from.
        self._countfill = True  # 9->10: 9 becomes 09. 99->100: 99 becomes 099.
        self._countpreedit = ""  # String that is prepended to the counter.
        self._countstep = 1  # Increment per count iteration.
        self._countsufedit = ""  # String that is appended to the counter.
        self._deletecheck = False  # Whether to delete a specified range.
        self._deleteend = 1  # End index of deletion sequence.
        self._deletestart = 0  # Start index of deletion sequence.
        self._filteredit = ""
        self._insertcheck = False  # Whether to apply an insertion.
        self._insertedit = ""  # The inserted text/string.
        self._insertpos = 0  # Position/Index to insert at.
        self._manualmirror = False  # Mirror manual rename to all targets.
        self._matchcheck = True  # Whether to apply source/target patterns.
        self._matchexcludecheck = False
        self._matchfiltercheck = False
        self._matchreplacecheck = True
        self._casecheck = True if isinstance(casemode, str) else False
        self._countcheck = True if isinstance(countpos, str) else False
        removelist = [remdups, remext, remnonwords, remsymbols]
        self._removecheck = True if any(removelist) else False
        self._spacecheck = True if isinstance(spacemode, str) else False
        self.stopupdate = False
        self.stopcommit = False
        self.includes = set()
        self.excludes = set()
        self.recursiveincludes = set()
        self.recursiveexcludes = set()
        self.configdir = helpers.get_configdir()
        # Create the logger.
        helpers.configure_logger(verbosity, quiet, self.configdir)
        self.history = []  # History of commited operations, used to undo them.
        # Match everything inside one set of braces:
        self.bracerx = re.compile("(?<=\{)(.*?)(?=\})")
dataset/ETHPy150Open mikar/demimove/demimove/fileops.py/FileOps.__init__