Open

        Pass arguments and return open file.

        @param append: Open for writing, appending to the end of the file if
        it exists.  Default as False.
        @param write: Open for writing, truncating the file first.  Default
        as False.
        @type append: Boolean
        @type write: Boolean
        @return: Open file function.

def open(self, append: bool = False, write: bool = False):
        """ Open

        Pass arguments and return open file.

        @param append: Open for writing, appending to the end of the file if
        it exists.  Default as False.
        @param write: Open for writing, truncating the file first.  Default
        as False.
        @type append: Boolean
        @type write: Boolean
        @return: Open file function.
        """

        flag = {(False, False): 'r',
                (True, False): 'a',
                (True, True): 'a',
                (False, True): 'w'}[(append, write)]

        realPath = self.realPath
        realDir = os.path.dirname(realPath)
        if not os.path.exists(realDir):
            os.makedirs(realDir, DirSettings.defaultDirChmod)
        return open(self.realPath, flag)