axiosengine/axios/Engine/File/AxiosTitleFile.cs
Nathan Adams 5de23be1fe + * - Changing AxiosTitleFile.GetStream() to return Stream instead of FileStream
+ * - Changing IAxiosFile.GetStream() to return Stream instead of FileStream
2012-05-21 21:53:14 -05:00

37 lines
940 B
C#

using System;
using System.IO;
using Axios.Engine.Interfaces;
using Microsoft.Xna.Framework;
namespace Axios.Engine.File
{
public class AxiosTitleFile : AxiosFile, IAxiosFile
{
public AxiosTitleFile(string filename)
{
//Title Files can only be opened for reading!
this._filename = filename;
}
public override void WriteData(string data, FileMode mode)
{
throw new NotImplementedException();
}
public override string ReadData()
{
StreamReader sr = new StreamReader(TitleContainer.OpenStream(_filename));
this.Content = sr.ReadToEnd();
sr.Close();
return this.Content;
}
public override Stream GetStream(FileMode mode)
{
return (Stream)TitleContainer.OpenStream(_filename);;
}
}
}