Make owner() and group() methods, rather than properties.
It didn't make sense to keep them as properties as all other metadata-querying APIs are now exposed under the form of methods (e.g. is_dir(), etc.), and there's no stat() caching anymore.
This commit is contained in:
parent
cf1a377f65
commit
00a5db2a5d
|
@ -594,12 +594,12 @@ Higher-level methods help examine the kind of the file::
|
||||||
False
|
False
|
||||||
|
|
||||||
The file owner and group names (rather than numeric ids) are queried
|
The file owner and group names (rather than numeric ids) are queried
|
||||||
through matching properties::
|
through corresponding methods::
|
||||||
|
|
||||||
>>> p = Path('/etc/shadow')
|
>>> p = Path('/etc/shadow')
|
||||||
>>> p.owner
|
>>> p.owner()
|
||||||
'root'
|
'root'
|
||||||
>>> p.group
|
>>> p.group()
|
||||||
'shadow'
|
'shadow'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue