1、接口实现
This commit is contained in:
1 parent
500c927883
commit
aace751d01
2 files changed
+12
-8
No files matched your search
@@ -44,6 +44,10 @@ namespace seafile::fs {
|
|||||||
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem, PVOID FileContext0, PWSTR Pattern, PWSTR Marker,
|
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem, PVOID FileContext0, PWSTR Pattern, PWSTR Marker,
|
||||||
PVOID Buffer, ULONG BufferLength, PULONG PBytesTransferred);
|
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,
|
static NTSTATUS SetSecurity(FSP_FILE_SYSTEM *FileSystem,
|
||||||
PVOID FileContext,
|
PVOID FileContext,
|
||||||
SECURITY_INFORMATION SecurityInformation,
|
SECURITY_INFORMATION SecurityInformation,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
//
|
//
|
||||||
// Created by Shell on 2026/6/20.
|
// Created by Shell on 2026/6/20.
|
||||||
//
|
//
|
||||||
#include "seafile/fs/winfsp_adapter.hpp"
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace seafile::fs {
|
namespace seafile::fs {
|
||||||
@@ -21,7 +20,7 @@ namespace seafile::fs {
|
|||||||
.GetSecurity = WinFSPAdapter::GetSecurity,
|
.GetSecurity = WinFSPAdapter::GetSecurity,
|
||||||
.SetSecurity = WinFSPAdapter::SetSecurity,
|
.SetSecurity = WinFSPAdapter::SetSecurity,
|
||||||
.ReadDirectory = WinFSPAdapter::ReadDirectory,
|
.ReadDirectory = WinFSPAdapter::ReadDirectory,
|
||||||
|
.GetDirInfoByName = WinFSPAdapter::GetDirInfoByName
|
||||||
};
|
};
|
||||||
std::unordered_map<FSP_FILE_SYSTEM *, SeafileFileSystem *> fstab;
|
std::unordered_map<FSP_FILE_SYSTEM *, SeafileFileSystem *> fstab;
|
||||||
|
|
||||||
@@ -92,12 +91,6 @@ namespace seafile::fs {
|
|||||||
TRUE);
|
TRUE);
|
||||||
std::cout << Result << std::endl;
|
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;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,6 +107,7 @@ namespace seafile::fs {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS WinFSPAdapter::GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem, FSP_FSCTL_VOLUME_INFO *VolumeInfo) {
|
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);
|
auto fs = static_cast<SeafileFileSystem *>(FileSystem->UserContext);
|
||||||
return fs->GetVolumeInfo(VolumeInfo);
|
return fs->GetVolumeInfo(VolumeInfo);
|
||||||
}
|
}
|
||||||
@@ -133,6 +127,12 @@ namespace seafile::fs {
|
|||||||
return fs->ReadDirectory(FileContext0, Pattern, Marker, Buffer, BufferLength, PBytesTransferred);
|
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,
|
NTSTATUS WinFSPAdapter::GetSecurityByName(FSP_FILE_SYSTEM *FileSystem, PWSTR FileName, PUINT32 PFileAttributes,
|
||||||
PSECURITY_DESCRIPTOR SecurityDescriptor,
|
PSECURITY_DESCRIPTOR SecurityDescriptor,
|
||||||
|
|||||||
Reference in new issue
Block a user