FindMoreRecentLastWriteTime() public static method

Determines if one of the given files has a more recent last write time than the given time. If one of the given files no longer exists, the target will be considered out-of-date.
public static FindMoreRecentLastWriteTime ( StringCollection fileNames, System.DateTime targetLastWriteTime ) : string
fileNames System.Collections.Specialized.StringCollection A collection of filenames to check the last write time against.
targetLastWriteTime System.DateTime The datetime to compare against.
return string
コード例 #1
0
        /// <summary>
        /// Determines if a file has a more recent last write time than the
        /// given time, or no longer exists.
        /// </summary>
        /// <param name="fileName">A file to check the last write time against.</param>
        /// <param name="targetLastWriteTime">The datetime to compare against.</param>
        /// <returns>
        /// The name of the file that has a last write time greater than
        /// <paramref name="targetLastWriteTime" /> or that no longer exists;
        /// otherwise, <see langword="null" />.
        /// </returns>
        public static string FindMoreRecentLastWriteTime(string fileName, DateTime targetLastWriteTime)
        {
            StringCollection fileNames = new StringCollection();

            fileNames.Add(fileName);
            return(FileSet.FindMoreRecentLastWriteTime(fileNames, targetLastWriteTime));
        }