Exemple #1
0
		/// <summary>
		/// Gets the contents of the file with the specified <paramref name="path"/>.
		/// </summary>
		/// <returns>
		/// An array of <see cref="byte"/> that receives the contents of the file,
		/// or <see langword="null"/> if it doesn't exist.
		/// </returns>
		/// <param name="path">
		/// A <see cref="string"/> that represents the virtual path to the file to find.
		/// </param>
		public byte[] GetFile (string path)
			{
			path = Path.Combine (RootPath, path);
			if (_windows)
				path = path.Replace ("/", "\\");

			return File.Exists (path) ? File.ReadAllBytes (path) : null;
			}
 public static void SaveAs(this byte[] input, string path)
 {
     File.WriteAllBytes(path, input);
 }