<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pathName(self, pathName: str):
 """ 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 """


        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)