-
-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathAzureBlobStorageDirectoryEntry.cs
More file actions
33 lines (27 loc) · 1.09 KB
/
AzureBlobStorageDirectoryEntry.cs
File metadata and controls
33 lines (27 loc) · 1.09 KB
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
// <copyright file="S3DirectoryEntry.cs" company="Fubar Development Junker">
// Copyright (c) Fubar Development Junker. All rights reserved.
// </copyright>
using System.IO;
namespace FubarDev.FtpServer.FileSystem.AzureBlobStorage
{
/// <summary>
/// The virtual directory entry for blob objects.
/// </summary>
internal class AzureBlobStorageDirectoryEntry : AzureBlobStorageFileSystemEntry, IUnixDirectoryEntry
{
/// <summary>
/// Initializes a new instance of the <see cref="AzureBlobStorageDirectoryEntry"/> class.
/// </summary>
/// <param name="key">The path/prefix of the child entries.</param>
/// <param name="isRoot">Determines if this is the root directory.</param>
public AzureBlobStorageDirectoryEntry(string key, bool isRoot = false)
: base(key.EndsWith("/") || isRoot ? key : key + "/", Path.GetFileName(key.TrimEnd('/')))
{
IsRoot = isRoot;
}
/// <inheritdoc />
public bool IsRoot { get; }
/// <inheritdoc />
public bool IsDeletable => !IsRoot;
}
}