Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="texturePath"></param>
        /// <returns></returns>
        bool IsTextureModifiedSince(DateTime targetLastWriteTimeUtc, string texturePath)
        {
            if (string.IsNullOrWhiteSpace(texturePath))
            {
                return(false);
            }

            if (!context.ContentFileExists(texturePath))
            {
                Log.Warning("{0} does not exist", texturePath);
                return(true);                 /// or DateTime.Now???
            }

            var fullPath = context.ResolveContentPath(texturePath);

            if (targetLastWriteTimeUtc <= File.GetLastWriteTimeUtc(fullPath))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }