
At 05:42 PM 6/22/2009 +0200, Tarek Ziadé wrote:
As long as the file is always *read* with "U" mode, so that you can't mess it up, especially if the install is to a directory shared between platforms.
This could equally well be done by ``owners(path)``, returning a sequence of zero or more items. Any length <> 1 means the file can't be safely removed. Meanwhile, having the data about all the owners of a file would also be useful for tools that just want to inspect a directory's contents, for example, or to detect conflicts and overwrites.

2009/6/22 P.J. Eby <pje@telecommunity.com>:
Adding that too, thanks;
that's basically what "get_file_users" does except it's an iterator, roughly that would be : def get_file_owners(path): return list(get_file_users(paths)) So I am wondering if it worth having it.... -- Tarek Ziadé | http://ziade.org

2009/6/22 P.J. Eby <pje@telecommunity.com>:
Adding that too, thanks;
that's basically what "get_file_users" does except it's an iterator, roughly that would be : def get_file_owners(path): return list(get_file_users(paths)) So I am wondering if it worth having it.... -- Tarek Ziadé | http://ziade.org
participants (2)
-
P.J. Eby
-
Tarek Ziadé