(self, mode=0o777, parents=False, exist_ok=False)
Create a new directory at this given path.
Create a new directory at this given path.
Create a new directory at this given path .
def mkdir(self, mode=0o777, parents=False, exist_ok=False):
        """
        Create a new directory at this given path.
        """
        try:
            self._accessor.mkdir(self, mode)
        except FileNotFoundError:
            if not parents or self.parent == self:
                raise
            self.parent.mkdir(parents=True, exist_ok=True)
            self.mkdir(mode, parents=False, exist_ok=exist_ok)
        except OSError:
            # Cannot rely on checking for EEXIST, since the operating system
            # could give priority to other errors like EACCES or EROFS
            if not exist_ok or not self.is_dir():
                raise
def mkdir ( self , mode = 0o777 , parents = False , exist_ok = False ) : try : self . _accessor . mkdir ( self , mode ) except FileNotFoundError : if not parents or self . parent == self : raise self . parent . mkdir ( parents = True , exist_ok = True ) self . mkdir ( mode , parents = False , exist_ok = exist_ok ) except OSError : # Cannot rely on checking for EEXIST, since the operating system # could give priority to other errors like EACCES or EROFS if not exist_ok or not self . is_dir ( ) : raise