-
Notifications
You must be signed in to change notification settings - Fork 0
/
ChmodEventArgs.cs
executable file
·45 lines (39 loc) · 1.41 KB
/
ChmodEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System.Runtime.InteropServices;
namespace WinSCP
{
[Guid("DFCA88E2-6A47-4290-AD66-A39C5682D610")]
[ClassInterface(Constants.ClassInterface)]
[ComVisible(true)]
public sealed class ChmodEventArgs : FileOperationEventArgs
{
public FilePermissions FilePermissions { get; private set; }
internal const string Tag = "chmod";
private ChmodEventArgs()
{
}
internal static ChmodEventArgs Read(CustomLogReader areader)
{
ChmodEventArgs args = new ChmodEventArgs();
using (ElementLogReader reader = new ElementLogReader(areader))
{
while (reader.Read(0))
{
string value;
if (reader.GetEmptyElementValue("filename", out value))
{
args.FileName = value;
}
else if (reader.GetEmptyElementValue("permissions", out value))
{
args.FilePermissions = FilePermissions.CreateReadOnlyFromText(value);
}
else if (SessionRemoteException.IsResult(reader))
{
args.Error = SessionRemoteException.ReadResult(reader);
}
}
}
return args;
}
}
}