AGS.Editor.Utilities.DoesFileNeedRecompile C# (CSharp) Метод

DoesFileNeedRecompile() публичный статический Метод

Returns whether the sourceFile is newer than the destinationFile or if the destinationFile doesn't exist.
public static DoesFileNeedRecompile ( string sourceFile, string destinationFile ) : bool
sourceFile string
destinationFile string
Результат bool
        public static bool DoesFileNeedRecompile(string sourceFile, string destinationFile)
        {
            if (!File.Exists(sourceFile))
            {
                throw new ArgumentException("Source file does not exist: " + sourceFile);
            }
            if (!File.Exists(destinationFile))
            {
                return true;
            }
            return (File.GetLastWriteTime(sourceFile) > File.GetLastWriteTime(destinationFile));
        }