File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3037,10 +3037,16 @@ features:
30373037
30383038 .. attribute :: path
30393039
3040- The entry's full path name: equivalent to ``os.path.join(scandir_path,
3041- entry.name) `` where *scandir_path * is the :func: `scandir ` *path *
3042- argument. The path is only absolute if the :func: `scandir ` *path *
3043- argument was absolute. If the :func: `scandir ` *path *
3040+ The entry's path name: equivalent to ``os.path.join(scandir_path,
3041+ entry.name) `` where *scandir_path * is the original :func: `scandir `
3042+ *path * argument. Apart from the filename, the path preserves the
3043+ original :func: `scandir ` argument. If the :func: `scandir ` *path *
3044+ argument was relative, the :attr: `path ` attribute is also relative.
3045+ Changing the current working directory after creating the
3046+ :func: `scandir ` iterator may cause later uses of :attr: `path ` to resolve
3047+ differently. On some platforms, the constructed path may not be valid
3048+ if the original :func: `scandir ` argument was usable for enumeration but
3049+ not for joining with the entry name. If the :func: `scandir ` *path *
30443050 argument was a :ref: `file descriptor <path_fd >`, the :attr: `path `
30453051 attribute is the same as the :attr: `name ` attribute.
30463052
You can’t perform that action at this time.
0 commit comments