Example #1
0
        /// <summary>
        /// _
        /// </summary>
        /// <param name="directoryPath"></param>
        /// <returns>true if the file exists at the given time</returns>
        public static bool WaitForFileToBeCreated(string directoryPath, int milliSec, string filter)
        {
            var fileAutomation = new FileAutomation();
            WaitForChangedResult waitForChanged = fileAutomation.WaitForChanged(directoryPath, filter,
                                                                                WatcherChangeTypes.Created, milliSec);
            bool b = waitForChanged.Name + "" != "";

            return(b);
        }
Example #2
0
 /// <summary>
 /// _
 /// </summary>
 /// <param name="directoryPath"></param>
 /// <param name="milliSec"></param>
 /// <param name="filter"></param>
 /// <returns>true if the file exists at the given time</returns>
 public static bool WaitForFileToBeCreated(string directoryPath, int milliSec, string filter) {
     var fileAutomation = new FileAutomation();
     WaitForChangedResult waitForChanged = fileAutomation.WaitForChanged(directoryPath, filter,
                                                                         WatcherChangeTypes.Created, milliSec);
     bool b = waitForChanged.Name + "" != "";
     return b;
 }