mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-12-03 10:50:01 +00:00
20 lines
467 B
C#
20 lines
467 B
C#
|
using System.IO;
|
|||
|
|
|||
|
namespace Jellyfish.Library
|
|||
|
{
|
|||
|
public static class FileHelpers
|
|||
|
{
|
|||
|
public static byte[] ReadAllBytes(string path)
|
|||
|
{
|
|||
|
#if SILVERLIGHT || XBOX || ZUNE
|
|||
|
using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.Read))
|
|||
|
{
|
|||
|
return stream.ReadAllBytes();
|
|||
|
}
|
|||
|
#else
|
|||
|
return File.ReadAllBytes(path);
|
|||
|
#endif
|
|||
|
}
|
|||
|
}
|
|||
|
}
|