mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
19 lines
478 B
C#
19 lines
478 B
C#
using System.IO;
|
|
|
|
using IL2CPU.API.Attribs;
|
|
|
|
namespace Cosmos.System_Plugs.System.IO
|
|
{
|
|
[Plug(Target = typeof(FileInfo))]
|
|
public static class FileInfoImpl
|
|
{
|
|
/* Optimize this: CosmosVFS should expose an attribute without the need to open the file for reading... */
|
|
public static long get_Length(FileInfo aThis)
|
|
{
|
|
using (var xFs = aThis.OpenRead())
|
|
{
|
|
return xFs.Length;
|
|
}
|
|
}
|
|
}
|
|
}
|