1、接口实现

This commit is contained in:
shell committed 2026-06-21 21:56:30 +08:00
1 parent 500c927883
commit aace751d01
2 files changed
+12 -8

No files matched your search

+4
View File
@@ -44,6 +44,10 @@ namespace seafile::fs {
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem, PVOID FileContext0, PWSTR Pattern, PWSTR Marker,
PVOID Buffer, ULONG BufferLength, PULONG PBytesTransferred);
static NTSTATUS GetDirInfoByName(FSP_FILE_SYSTEM *FileSystem,
PVOID FileContext, PWSTR FileName,
FSP_FSCTL_DIR_INFO *DirInfo);
static NTSTATUS SetSecurity(FSP_FILE_SYSTEM *FileSystem,
PVOID FileContext,
SECURITY_INFORMATION SecurityInformation,
+8 -8
View File
@@ -4,7 +4,6 @@
//
// Created by Shell on 2026/6/20.
//
#include "seafile/fs/winfsp_adapter.hpp"
#include <unordered_map>
namespace seafile::fs {
@@ -21,7 +20,7 @@ namespace seafile::fs {
.GetSecurity = WinFSPAdapter::GetSecurity,
.SetSecurity = WinFSPAdapter::SetSecurity,
.ReadDirectory = WinFSPAdapter::ReadDirectory,
.GetDirInfoByName = WinFSPAdapter::GetDirInfoByName
};
std::unordered_map<FSP_FILE_SYSTEM *, SeafileFileSystem *> fstab;
@@ -92,12 +91,6 @@ namespace seafile::fs {
TRUE);
std::cout << Result << std::endl;
FSP_FSCTL_VOLUME_INFO volumeInfo{};
auto status = GetVolumeInfo(FileSystem, &volumeInfo);
std::cout << "GetVolumeInfo direct call = "
<< std::hex << status
<< std::endl;
return Result;
}
@@ -114,6 +107,7 @@ namespace seafile::fs {
}
NTSTATUS WinFSPAdapter::GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem, FSP_FSCTL_VOLUME_INFO *VolumeInfo) {
std::cout<<"Getting Volume Info" <<std::endl;
auto fs = static_cast<SeafileFileSystem *>(FileSystem->UserContext);
return fs->GetVolumeInfo(VolumeInfo);
}
@@ -133,6 +127,12 @@ namespace seafile::fs {
return fs->ReadDirectory(FileContext0, Pattern, Marker, Buffer, BufferLength, PBytesTransferred);
}
NTSTATUS WinFSPAdapter::GetDirInfoByName(FSP_FILE_SYSTEM *FileSystem,
PVOID FileContext, PWSTR FileName,
FSP_FSCTL_DIR_INFO *DirInfo) {
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS WinFSPAdapter::GetSecurityByName(FSP_FILE_SYSTEM *FileSystem, PWSTR FileName, PUINT32 PFileAttributes,
PSECURITY_DESCRIPTOR SecurityDescriptor,