c++ - Check directory's sharing mode in windows -


my question seems simple, google silent. i'm banned may be?:)

so question can check there blocked deleting file in directory or it's subdirectories before delete it? there simple way it?

no, there isn't.

and if there was, wouldn't work. consider sequence of events:

  1. you perform check , succeeds (there no blocked files).
  2. another process receives cpu quantum , opens file without file_share_delete flag.
  3. your process gains cpu , proceeds delete directory -- discover can't, because there is blocked file.

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -