mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 00:43:00 -05:00
dotnet: interop: FileInfo.EaSize is now a property
This commit is contained in:
parent
46210b0c48
commit
88896c2fd8
@ -196,10 +196,28 @@ namespace Fsp.Interop
|
|||||||
/// Not currently implemented. Set to 0.
|
/// Not currently implemented. Set to 0.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UInt32 HardLinks;
|
public UInt32 HardLinks;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The extended attribute size of the file.
|
/// The extended attribute size of the file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UInt32 EaSize;
|
public UInt32 EaSize
|
||||||
|
{
|
||||||
|
get { return GetEaSize(); }
|
||||||
|
set { SetEaSize(value); }
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static int EaSizeOffset =
|
||||||
|
(int)Marshal.OffsetOf(typeof(FileInfo), "HardLinks") + 4;
|
||||||
|
internal unsafe UInt32 GetEaSize()
|
||||||
|
{
|
||||||
|
fixed (FileInfo *P = &this)
|
||||||
|
return *(UInt32 *)((Int64)(IntPtr)P + EaSizeOffset);
|
||||||
|
}
|
||||||
|
internal unsafe void SetEaSize(UInt32 value)
|
||||||
|
{
|
||||||
|
fixed (FileInfo *P = &this)
|
||||||
|
*(UInt32 *)((Int64)(IntPtr)P + EaSizeOffset) = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
@ -78,7 +78,6 @@ namespace passthrough
|
|||||||
FileInfo.ChangeTime = FileInfo.LastWriteTime;
|
FileInfo.ChangeTime = FileInfo.LastWriteTime;
|
||||||
FileInfo.IndexNumber = 0;
|
FileInfo.IndexNumber = 0;
|
||||||
FileInfo.HardLinks = 0;
|
FileInfo.HardLinks = 0;
|
||||||
FileInfo.EaSize = 0;
|
|
||||||
}
|
}
|
||||||
public Int32 GetFileInfo(out FileInfo FileInfo)
|
public Int32 GetFileInfo(out FileInfo FileInfo)
|
||||||
{
|
{
|
||||||
@ -99,7 +98,6 @@ namespace passthrough
|
|||||||
FileInfo.ChangeTime = FileInfo.LastWriteTime;
|
FileInfo.ChangeTime = FileInfo.LastWriteTime;
|
||||||
FileInfo.IndexNumber = 0;
|
FileInfo.IndexNumber = 0;
|
||||||
FileInfo.HardLinks = 0;
|
FileInfo.HardLinks = 0;
|
||||||
FileInfo.EaSize = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
GetFileInfoFromFileSystemInfo(DirInfo, out FileInfo);
|
GetFileInfoFromFileSystemInfo(DirInfo, out FileInfo);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user