mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 18:57:48 +02:00
NTFileSystemHelper: Return FileNameInformation / FileAllInformation
This commit is contained in:
parent
ce96106b5b
commit
6f6eb59b5d
1 changed files with 25 additions and 2 deletions
|
@ -75,6 +75,18 @@ namespace SMBLibrary.Server
|
||||||
result = information;
|
result = information;
|
||||||
return NTStatus.STATUS_SUCCESS;
|
return NTStatus.STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
case FileInformationClass.FileAccessInformation:
|
||||||
|
{
|
||||||
|
result = null;
|
||||||
|
return NTStatus.STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
case FileInformationClass.FileNameInformation:
|
||||||
|
{
|
||||||
|
FileNameInformation information = new FileNameInformation();
|
||||||
|
information.FileName = entry.Name;
|
||||||
|
result = information;
|
||||||
|
return NTStatus.STATUS_SUCCESS;
|
||||||
|
}
|
||||||
case FileInformationClass.FilePositionInformation:
|
case FileInformationClass.FilePositionInformation:
|
||||||
{
|
{
|
||||||
result = null;
|
result = null;
|
||||||
|
@ -97,8 +109,19 @@ namespace SMBLibrary.Server
|
||||||
}
|
}
|
||||||
case FileInformationClass.FileAllInformation:
|
case FileInformationClass.FileAllInformation:
|
||||||
{
|
{
|
||||||
result = null;
|
FileAllInformation information = new FileAllInformation();
|
||||||
return NTStatus.STATUS_NOT_IMPLEMENTED;
|
information.BasicInformation.CreationTime = entry.CreationTime;
|
||||||
|
information.BasicInformation.LastAccessTime = entry.LastAccessTime;
|
||||||
|
information.BasicInformation.LastWriteTime = entry.LastWriteTime;
|
||||||
|
information.BasicInformation.ChangeTime = entry.LastWriteTime;
|
||||||
|
information.BasicInformation.FileAttributes = GetFileAttributes(entry);
|
||||||
|
information.StandardInformation.AllocationSize = (long)GetAllocationSize(entry.Size);
|
||||||
|
information.StandardInformation.EndOfFile = (long)entry.Size;
|
||||||
|
information.StandardInformation.Directory = entry.IsDirectory;
|
||||||
|
information.StandardInformation.DeletePending = deletePending;
|
||||||
|
information.NameInformation.FileName = entry.Name;
|
||||||
|
result = information;
|
||||||
|
return NTStatus.STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
case FileInformationClass.FileAlternateNameInformation:
|
case FileInformationClass.FileAlternateNameInformation:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue