mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-11-28 07:49:22 +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
|
|||
|
}
|
|||
|
}
|
|||
|
}
|