Fusion.Build.BuildContext.ResolveContentPath C# (CSharp) Method

ResolveContentPath() public method

public ResolveContentPath ( string path ) : string
path string
return string
		public string ResolveContentPath ( string path )
		{
			return ResolvePath( path, ContentDirectories );
		}

Usage Example

Beispiel #1
0
        /// <summary>
        /// Return list of key path to changed content file.
        /// </summary>
        /// <returns></returns>
        public IEnumerable <string> GetChangedDependencies()
        {
            var changedDeps = new List <string>();

            if (!TargetFileExists)
            {
                throw new InvalidOperationException("Target file does not exist");
            }

            var targetTime = File.GetLastWriteTime(FullTargetPath);

            using (var assetStream = AssetStream.OpenRead(FullTargetPath)) {
                foreach (var dependency in assetStream.Dependencies)
                {
                    if (context.ContentFileExists(dependency))
                    {
                        var fullDependencyPath = context.ResolveContentPath(dependency);

                        var sourceTime = File.GetLastWriteTime(fullDependencyPath);

                        if (targetTime < sourceTime)
                        {
                            changedDeps.Add(dependency);
                        }
                    }
                }
            }

            return(changedDeps);
        }
All Usage Examples Of Fusion.Build.BuildContext::ResolveContentPath