mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 20:42:09 -05:00
Added FpsVersion as a static method in FileSystemHost
Added FlushAndPurgeOnCleanup
This commit is contained in:
parent
d0f5ea69a2
commit
fb8cb8aca9
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
################################################################################
|
||||
|
||||
*.db
|
||||
*.opendb
|
||||
|
@ -194,6 +194,11 @@ namespace Fsp
|
||||
get { return 0 != (_VolumeParams.Flags & VolumeParams.PassQueryDirectoryFileName); }
|
||||
set { _VolumeParams.Flags |= (value ? VolumeParams.PassQueryDirectoryFileName : 0); }
|
||||
}
|
||||
public Boolean FlushAndPurgeOnCleanup
|
||||
{
|
||||
get { return 0 != (_VolumeParams.Flags & VolumeParams.FlushAndPurgeOnCleanup); }
|
||||
set { _VolumeParams.Flags |= (value ? VolumeParams.FlushAndPurgeOnCleanup : 0); }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the prefix for a network file system.
|
||||
/// </summary>
|
||||
@ -347,6 +352,14 @@ namespace Fsp
|
||||
{
|
||||
return Api.SetDebugLogFile(FileName);
|
||||
}
|
||||
/// <summary>
|
||||
/// Return the installed version for WinFSP
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Version GetFspVersion()
|
||||
{
|
||||
return Api.GetFspVersion();
|
||||
}
|
||||
|
||||
/* FSP_FILE_SYSTEM_INTERFACE */
|
||||
private static Byte[] ByteBufferNotNull = new Byte[0];
|
||||
|
@ -43,6 +43,7 @@ namespace Fsp.Interop
|
||||
internal const UInt32 PassQueryDirectoryPattern = 0x00000800;
|
||||
internal const UInt32 AlwaysUseDoubleBuffering = 0x00001000;
|
||||
internal const UInt32 PassQueryDirectoryFileName = 0x00002000;
|
||||
internal const UInt32 FlushAndPurgeOnCleanup = 0x00004000;
|
||||
internal const UInt32 UmFileContextIsUserContext2 = 0x00010000;
|
||||
internal const UInt32 UmFileContextIsFullContext = 0x00020000;
|
||||
internal const int PrefixSize = 192;
|
||||
@ -979,6 +980,15 @@ namespace Fsp.Interop
|
||||
return 0/*STATUS_SUCCESS*/;
|
||||
}
|
||||
|
||||
internal static Version GetFspVersion()
|
||||
{
|
||||
UInt32 Version = 0, VersionMajor, VersionMinor;
|
||||
FspVersion(out Version);
|
||||
VersionMajor = Version >> 16;
|
||||
VersionMinor = Version & 0xFFFF;
|
||||
return new System.Version((Int32)VersionMajor, (Int32)VersionMinor);
|
||||
}
|
||||
|
||||
/* initialization */
|
||||
private static IntPtr LoadDll()
|
||||
{
|
||||
|
@ -255,6 +255,7 @@ namespace memfs
|
||||
Host.NamedStreams = true;
|
||||
Host.PostCleanupWhenModifiedOnly = true;
|
||||
Host.PassQueryDirectoryFileName = true;
|
||||
Host.FlushAndPurgeOnCleanup = true;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user