/
FileSmbProperties.cs
95 lines (82 loc) · 2.79 KB
/
FileSmbProperties.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
90
91
92
93
94
95
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
#pragma warning disable SA1402 // File may only contain a single type
namespace Azure.Storage.Files.Shares.Models
{
/// <summary>
/// The SMB properties for a file.
/// </summary>
public class FileSmbProperties
{
/// <summary>
/// The file system attributes for this file.
/// </summary>
public NtfsFileAttributes? FileAttributes { get; set; }
/// <summary>
/// The key of the file permission.
/// </summary>
public string FilePermissionKey { get; set; }
/// <summary>
/// The creation time of the file.
/// </summary>
public DateTimeOffset? FileCreatedOn { get; set; }
/// <summary>
/// The last write time of the file.
/// </summary>
public DateTimeOffset? FileLastWrittenOn { get; set; }
/// <summary>
/// The change time of the file.
/// </summary>
public DateTimeOffset? FileChangedOn { get; set; }
/// <summary>
/// The fileId of the file.
/// </summary>
public string FileId { get; internal set; }
/// <summary>
/// The parentId of the file
/// </summary>
public string ParentId { get; internal set; }
/// <summary>
/// Creates a new FileSmbProperties instance.
/// </summary>
public FileSmbProperties() {}
/// <summary>
/// Checks if two FileSmbProperties are equal.
/// </summary>
/// <param name="other">The other instance to compare to.</param>
/// <returns></returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object other)
=> base.Equals(other);
/// <summary>
/// Gets the hash code for the FileSmbProperties.
/// </summary>
/// <returns></returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => base.GetHashCode();
}
/// <summary>
/// FilesModelFactory provides utilities for mocking.
/// </summary>
public static partial class SharesModelFactory
{
/// <summary>
/// Creates a new FileSmbProperties instance for mocking.
/// </summary>
public static FileSmbProperties FileSmbProperties(
DateTimeOffset? fileChangedOn,
string fileId,
string parentId) => new FileSmbProperties
{
FileChangedOn = fileChangedOn,
FileId = fileId,
ParentId = parentId
};
}
}