I'm trying to fsync a directory, to ensure that rename operation occurs. The problem that I'm having is that Python keeps returning a permission error, even though I have full permissions for the various folders I've tried this on.
directory = r'C:RandomPath'
os.access(directory, os.W_OK)
os.access(directory, os.X_OK)
os.access(directory, os.R_OK)
True, True, True
fd = open(directory)
os.fsync(fd)
IOError: [Errno 13] Permission denied: 'C:\Random\Path'
Am I doing something wrong, or is there something deeper going on?
Aucun commentaire:
Enregistrer un commentaire