1

Topic: End waiting

It was pushed with such problem that if 1. To delete a folder 2. To create a folder that at a stage 2 sometimes a call it is completed by failure because of as tells an Internet of asynchrony of operations with file system as a result that it to bypass the best that I invented - to repeat 2 it does not turn out yet, whether like works but  stupidly to eat better ?

2

Re: End waiting

Hello, Barbar1an, you wrote: B> it was pushed with such problem that if B> 1. To delete folder B> 2. To create folder B> that at a stage 2 sometimes a call it is completed by failure because of as tells an Internet of asynchrony of operations with file system And an error what? B> as a result that it to bypass the best that I invented - to repeat 2 it does not turn out yet, whether like works but  stupidly B> is better ? To rename a directory before its removal that it would not occupy a name on  while all descriptors will not be closed. P.S. From exotic on Windows 10 Restone 1 and  it is possible to try to use POSIX-semantics of removal. From wdm.h: FileDispositionInformationEx,//64 #define FILE_DISPOSITION_POSIX_SEMANTICS 0x00000002 typedef struct _FILE_DISPOSITION_INFORMATION_EX {ULONG Flags;} FILE_DISPOSITION_INFORMATION_EX, *PFILE_DISPOSITION_INFORMATION_EX; UPD: Checked up for the sake of interest: on normal NTFS-section usage of flag FILE_DISPOSITION_POSIX_SEMANTICS leads to error STATUS_VOLUME_NOT_UPGRADED (== 0xC000029C)

3

Re: End waiting

Hello, EreTIk, you wrote: ETI> Hello, Barbar1an, you wrote: B>> it was pushed with such problem that if B>> 1. To delete folder B>> 2. To create folder B>> that at a stage 2 sometimes a call it is completed by failure because of as tells an Internet of asynchrony of operations with file system ETI> And an error what? Any more I do not remember, and to play back  I am impossible I use std, but I read that from  does not depend std::experimental::filesystem::remove_all (TmpFolder); while (1) {std:: error_code e; std:: experimental:: filesystem:: copy (OriginFolder, TmpFolder, std::experimental::filesystem::copy_options::recursive); if (e)//wait for remove_all {Sleep (1); continue;} break;}

4

Re: End waiting

Hello, Barbar1an, you wrote: B> it was pushed with such problem that if B> 1. To delete a folder In my opinion, WaitForSingleObject can wait  for files. At least once I used it to wait file closing.