On 31/08/2011 13:38, Steffen Frömer wrote:
i try to check, if a file on network-share is read only. I tried
different ways.
What you're checking is the readonly attribute (which has been
there since DOS version x.0). If that is what you intended to
check, then I don't think I can offer
On 02/09/2011 10:58, Tim Golden wrote:
filename = rc:\windows\system32\drivers\etc\hosts,
win32file.CreateFile (
ntsecuritycon.FILE_GENERIC_WRITE, 0, ## exclusive write
None, win32con.OPEN_ALWAYS, 0, None
)
Just noticed that my code is unnecessarily trying to get an
exclusive lock. You
On Wed, Aug 31, 2011 at 8:38 AM, Steffen Frömer
steffen.froe...@gns-systems.de wrote:
Hello,
i try to check, if a file on network-share is read only. I tried different
ways.
Not the prettiest, but if you want to know if the SHARE is read only,
you can do a functional test.
import os,
Hello,
i try to check, if a file on network-share is read only. I tried
different ways.
filename = r'//server/share/filename.txt'
1:
import win32api, win32con
fileAtt = win32api.GetFileAttributes(filename)
if (fileAtt win32con.FILE_ATTRIBUTE_READONLY):
print(READONLY)
2:
import os,