mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 20:42:09 -05:00
memfs-dotnet: GetDirInfoByName
This commit is contained in:
parent
487d2449fe
commit
2438ece1cf
@ -254,6 +254,7 @@ namespace memfs
|
|||||||
Host.ReparsePointsAccessCheck = false;
|
Host.ReparsePointsAccessCheck = false;
|
||||||
Host.NamedStreams = true;
|
Host.NamedStreams = true;
|
||||||
Host.PostCleanupWhenModifiedOnly = true;
|
Host.PostCleanupWhenModifiedOnly = true;
|
||||||
|
Host.PassQueryDirectoryFileName = true;
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -849,6 +850,35 @@ namespace memfs
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override int GetDirInfoByName(
|
||||||
|
Object ParentNode0,
|
||||||
|
Object FileDesc,
|
||||||
|
String FileName,
|
||||||
|
out String NormalizedName,
|
||||||
|
out FileInfo FileInfo)
|
||||||
|
{
|
||||||
|
FileNode ParentNode = (FileNode)ParentNode0;
|
||||||
|
FileNode FileNode;
|
||||||
|
|
||||||
|
FileName =
|
||||||
|
ParentNode.FileName +
|
||||||
|
("\\" == ParentNode.FileName ? "" : "\\") +
|
||||||
|
Path.GetFileName(FileName);
|
||||||
|
|
||||||
|
FileNode = FileNodeMap.Get(FileName);
|
||||||
|
if (null == FileNode)
|
||||||
|
{
|
||||||
|
NormalizedName = default(String);
|
||||||
|
FileInfo = default(FileInfo);
|
||||||
|
return STATUS_OBJECT_NAME_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
NormalizedName = Path.GetFileName(FileNode.FileName);
|
||||||
|
FileInfo = FileNode.FileInfo;
|
||||||
|
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
public override Int32 GetReparsePointByName(
|
public override Int32 GetReparsePointByName(
|
||||||
String FileName,
|
String FileName,
|
||||||
Boolean IsDirectory,
|
Boolean IsDirectory,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user