using System;
using System.IO;

namespace LeafWeb.Core.Utility
{
	public static class FileUtility
	{
		public static FileInfo GetContentFile(string contentDirectory, string fileName, bool usePrivateBinPath = false)
		{
			string basePath;
			if (usePrivateBinPath)
				basePath = AppDomain.CurrentDomain.SetupInformation.PrivateBinPath;
			else
				basePath = AppDomain.CurrentDomain.BaseDirectory;
			var path = Path.Combine(basePath, contentDirectory);
			return new FileInfo(path + fileName);
		}
	}
}