mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys,dll: ReadDirectory: add Marker, remove Offset
This commit is contained in:
parent
76a2926116
commit
4fe72ab332
@ -647,10 +647,6 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
||||
* The file system on which this request is posted.
|
||||
* @param FileContext
|
||||
* The file context of the directory to be read.
|
||||
* @param Buffer
|
||||
* Pointer to a buffer that will receive the results of the read operation.
|
||||
* @param Length
|
||||
* Length of data to read.
|
||||
* @param Pattern
|
||||
* The pattern to match against files in this directory. Can be NULL. The file system
|
||||
* can choose to ignore this parameter as the FSD will always perform its own pattern
|
||||
@ -659,6 +655,10 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
||||
* A file name that marks where in the directory to start reading. Files with names
|
||||
* that are greater than (not equal to) this marker (in the directory order determined
|
||||
* by the file system) should be returned. Can be NULL.
|
||||
* @param Buffer
|
||||
* Pointer to a buffer that will receive the results of the read operation.
|
||||
* @param Length
|
||||
* Length of data to read.
|
||||
* @param PBytesTransferred [out]
|
||||
* Pointer to a memory location that will receive the actual number of bytes read.
|
||||
* @return
|
||||
@ -668,9 +668,8 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
||||
* FspFileSystemAddDirInfo
|
||||
*/
|
||||
NTSTATUS (*ReadDirectory)(FSP_FILE_SYSTEM *FileSystem,
|
||||
PVOID FileContext, PVOID Buffer, ULONG Length,
|
||||
PWSTR Pattern, PWSTR Marker,
|
||||
PULONG PBytesTransferred);
|
||||
PVOID FileContext, PWSTR Pattern, PWSTR Marker,
|
||||
PVOID Buffer, ULONG Length, PULONG PBytesTransferred);
|
||||
/**
|
||||
* Resolve reparse points.
|
||||
*
|
||||
|
@ -1133,12 +1133,12 @@ FSP_API NTSTATUS FspFileSystemOpQueryDirectory(FSP_FILE_SYSTEM *FileSystem,
|
||||
BytesTransferred = 0;
|
||||
Result = FileSystem->Interface->ReadDirectory(FileSystem,
|
||||
(PVOID)ValOfFileContext(Request->Req.QueryDirectory),
|
||||
(PVOID)Request->Req.QueryDirectory.Address,
|
||||
Request->Req.QueryDirectory.Length,
|
||||
0 != Request->Req.QueryDirectory.Pattern.Size ?
|
||||
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Pattern.Offset) : 0,
|
||||
0 != Request->Req.QueryDirectory.Marker.Size ?
|
||||
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Marker.Offset) : 0,
|
||||
(PVOID)Request->Req.QueryDirectory.Address,
|
||||
Request->Req.QueryDirectory.Length,
|
||||
&BytesTransferred);
|
||||
if (!NT_SUCCESS(Result))
|
||||
return Result;
|
||||
|
@ -1661,9 +1661,8 @@ int fsp_fuse_intf_AddDirInfoOld(fuse_dirh_t dh, const char *name,
|
||||
}
|
||||
|
||||
static NTSTATUS fsp_fuse_intf_ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
||||
PVOID FileContext, PVOID Buffer, ULONG Length,
|
||||
PWSTR Pattern, PWSTR Marker,
|
||||
PULONG PBytesTransferred)
|
||||
PVOID FileContext, PWSTR Pattern, PWSTR Marker,
|
||||
PVOID Buffer, ULONG Length, PULONG PBytesTransferred)
|
||||
{
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
#if 0
|
||||
|
@ -1341,9 +1341,8 @@ static BOOLEAN ReadDirectoryEnumFn(MEMFS_FILE_NODE *FileNode, PVOID Context0)
|
||||
}
|
||||
|
||||
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
||||
PVOID FileNode0, PVOID Buffer, ULONG Length,
|
||||
PWSTR Pattern, PWSTR Marker,
|
||||
PULONG PBytesTransferred)
|
||||
PVOID FileNode0, PWSTR Pattern, PWSTR Marker,
|
||||
PVOID Buffer, ULONG Length, PULONG PBytesTransferred)
|
||||
{
|
||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||
MEMFS_FILE_NODE *FileNode = (MEMFS_FILE_NODE *)FileNode0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user