mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
Added InformationLevel property to the SetInformation abstract class
This commit is contained in:
parent
841a267cdf
commit
0a6a4fcf44
7 changed files with 59 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -36,5 +36,13 @@ namespace SMBLibrary.SMB1
|
|||
{
|
||||
return ExtendedAttributeList.GetBytes();
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_INFO_SET_EAS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -39,5 +39,13 @@ namespace SMBLibrary.SMB1
|
|||
LittleEndianWriter.WriteUInt64(buffer, 0, AllocationSize);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_SET_FILE_ALLOCATION_INFO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,5 +54,13 @@ namespace SMBLibrary.SMB1
|
|||
LittleEndianWriter.WriteUInt32(buffer, 36, Reserved);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_SET_FILE_BASIC_INFO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -41,5 +41,13 @@ namespace SMBLibrary.SMB1
|
|||
ByteWriter.WriteByte(buffer, 0, Convert.ToByte(DeletePending));
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_SET_FILE_DISPOSITION_INFO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -39,5 +39,13 @@ namespace SMBLibrary.SMB1
|
|||
LittleEndianWriter.WriteUInt64(buffer, 0, EndOfFile);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_SET_FILE_END_OF_FILE_INFO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -49,5 +49,13 @@ namespace SMBLibrary.SMB1
|
|||
ByteWriter.WriteBytes(buffer, 12, Reserved);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
public override SetInformationLevel InformationLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return SetInformationLevel.SMB_INFO_STANDARD;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2014 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
/* Copyright (C) 2014-2017 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
|
||||
*
|
||||
* You can redistribute this program and/or modify it under the terms of
|
||||
* the GNU Lesser Public License as published by the Free Software Foundation,
|
||||
|
@ -15,6 +15,11 @@ namespace SMBLibrary.SMB1
|
|||
{
|
||||
public abstract byte[] GetBytes();
|
||||
|
||||
public abstract SetInformationLevel InformationLevel
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public static SetInformation GetSetInformation(byte[] buffer, SetInformationLevel informationLevel)
|
||||
{
|
||||
switch (informationLevel)
|
||||
|
|
Loading…
Add table
Reference in a new issue