code: def pathName(self, pathName: str):
          
  
          if self.pathName == pathName:
              return
  
          pathName = self.sanitise(pathName)
          before = self.realPath
          after = self._realPath(pathName)
  
          assert (not os.path.exists(after))
  
          newRealDir = os.path.dirname(after)
          if not os.path.exists(newRealDir):
              os.makedirs(newRealDir, DirSettings.defaultDirChmod)
  
          shutil.move(before, after)
  
          oldPathName = self._pathName
          self._pathName = pathName
  
          self._directory()._fileMoved(oldPathName, self)
docs: Path Name Setter
  
          Set path name with passed in variable, create new directory and move
          previous directory contents to new path name.
  
          @param pathName: New path name string.
          @type pathName: String