Adding GetStream(FileMode) to get the stream of a file
This commit is contained in:
parent
f152fc2978
commit
e74c663c02
@ -72,6 +72,7 @@
|
|||||||
* - Adding support for Gleed2D
|
* - Adding support for Gleed2D
|
||||||
* - Splitting the code for Gleed2D into seperate files
|
* - Splitting the code for Gleed2D into seperate files
|
||||||
* - Adding a cache for loading in textures for Gleed2D
|
* - Adding a cache for loading in textures for Gleed2D
|
||||||
|
* - Adding GetStream(FileMode) to get the stream of a file
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -28,5 +28,10 @@ namespace Axios.Engine.File
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual FileStream GetStream(FileMode mode)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -50,5 +50,18 @@ namespace Axios.Engine.File
|
|||||||
Content = ret;
|
Content = ret;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override FileStream GetStream(FileMode mode)
|
||||||
|
{
|
||||||
|
#if WINDOWS
|
||||||
|
IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForDomain();
|
||||||
|
#else
|
||||||
|
IsolatedStorageFile savegameStorage = IsolatedStorageFile.GetUserStoreForApplication();
|
||||||
|
#endif
|
||||||
|
IsolatedStorageFileStream fs = null;
|
||||||
|
fs = savegameStorage.OpenFile(_filename, mode);
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,11 @@ namespace Axios.Engine.File
|
|||||||
sr.Close();
|
sr.Close();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override FileStream GetStream(FileMode mode)
|
||||||
|
{
|
||||||
|
FileStream fs = new FileStream(_filename, mode);
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,5 +27,11 @@ namespace Axios.Engine.File
|
|||||||
sr.Close();
|
sr.Close();
|
||||||
return this.Content;
|
return this.Content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override FileStream GetStream(FileMode mode)
|
||||||
|
{
|
||||||
|
FileStream fs = (FileStream)TitleContainer.OpenStream(_filename);
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,5 +6,6 @@ namespace Axios.Engine.Interfaces
|
|||||||
{
|
{
|
||||||
void WriteData(string data, FileMode mode);
|
void WriteData(string data, FileMode mode);
|
||||||
string ReadData();
|
string ReadData();
|
||||||
|
FileStream GetStream(FileMode mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user