-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ShareFileHandle.cs
89 lines (76 loc) · 2.55 KB
/
ShareFileHandle.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace Azure.Storage.Files.Shares.Models
{
/// <summary>
/// ShareFileHandle.
/// </summary>
public class ShareFileHandle
{
internal ShareFileHandle() { }
/// <summary>
/// Time when the session that previously opened the handle has last been reconnected. (UTC).
/// </summary>
public DateTimeOffset? OpenedOn { get; internal set; }
/// <summary>
/// Time handle was last connected to (UTC).
/// </summary>
public DateTimeOffset? LastReconnectedOn { get; internal set; }
/// <summary>
/// XSMB service handle ID.
/// </summary>
public string HandleId { get; }
/// <summary>
/// File or directory name including full path starting from share root.
/// </summary>
public string Path { get; }
/// <summary>
/// FileId uniquely identifies the file or directory.
/// </summary>
public string FileId { get; }
/// <summary>
/// ParentId uniquely identifies the parent directory of the object.
/// </summary>
public string ParentId { get; }
/// <summary>
/// SMB session ID in context of which the file handle was opened.
/// </summary>
public string SessionId { get; }
/// <summary>
/// Client IP that opened the handle.
/// </summary>
public string ClientIp { get; }
/// <summary>
/// Client Name that opened the handle.
/// </summary>
public string ClientName { get; }
/// <summary>
/// Access rights of the handle.
/// </summary>
public ShareFileHandleAccessRights? AccessRights { get; }
internal ShareFileHandle(
string handleId,
string path,
string fileId,
string parentId,
string sessionId,
string clientIp,
string clientName,
DateTimeOffset? openedOn,
DateTimeOffset? lastReconnectedOn,
ShareFileHandleAccessRights? accessRights)
{
HandleId = handleId;
Path = path;
FileId = fileId;
ParentId = parentId;
SessionId = sessionId;
ClientIp = clientIp;
ClientName = clientName;
OpenedOn = openedOn;
LastReconnectedOn = lastReconnectedOn;
AccessRights = accessRights;
}
}
}