Skip to content

Commit f6f8362

Browse files
committed
v3.0.6973.0-Beta
1 parent 2f7973c commit f6f8362

File tree

331 files changed

+4896
-5463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

331 files changed

+4896
-5463
lines changed

ITHit.FileSystem.Samples.Common/ITHit.FileSystem.Samples.Common.csproj renamed to Common/Common.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<Company>IT Hit LTD.</Company>
66
<Product>IT Hit User File System</Product>
77
<Copyright>IT Hit User File System</Copyright>
8-
<Description>Contains functionality common for all Virtual Drive samples, both for Windows and macOS. You will inherit your file and folder classes from IUserFile and iUserFolder defined in this module.</Description>
8+
<Description>Contains functionality common for all Virtual Drive samples, both for Windows and macOS.</Description>
99
</PropertyGroup>
1010
<ItemGroup>
11-
<PackageReference Include="ITHit.FileSystem" Version="2.5.5091.0" />
11+
<PackageReference Include="ITHit.FileSystem" Version="3.0.6973.0-Beta" />
1212
</ItemGroup>
1313
</Project>

ITHit.FileSystem.Samples.Common/CustomColumnIds.cs renamed to Common/CustomColumnIds.cs

File renamed without changes.

ITHit.FileSystem.Samples.Common/FileMetadataExt.cs renamed to Common/FileMetadataExt.cs

File renamed without changes.

ITHit.FileSystem.Samples.Common/FileSystemItemMetadataExt.cs renamed to Common/FileSystemItemMetadataExt.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class FileSystemItemMetadataExt : IFileSystemItemMetadata
1919
public FileAttributes Attributes { get; set; }
2020

2121
///<inheritdoc/>
22-
public byte[] CustomData { get; set; }
22+
public byte[] CustomData { get; set; } = new byte[] { };
2323

2424
///<inheritdoc/>
2525
public DateTimeOffset CreationTime { get; set; }
@@ -48,11 +48,11 @@ public class FileSystemItemMetadataExt : IFileSystemItemMetadata
4848
/// she/he tries to update this item .
4949
/// Read-only flag does not protect this item from modifications.
5050
/// </remarks>
51-
public bool LockedByAnotherUser { get; set; }
51+
public bool LockedByAnotherUser { get; set; } = false;
5252

5353
/// <summary>
5454
/// Custom columns data to be displayed in the file manager.
5555
/// </summary>
56-
public IEnumerable<FileSystemItemPropertyData> CustomProperties { get; set; }
56+
public IEnumerable<FileSystemItemPropertyData> CustomProperties { get; set; } = new FileSystemItemPropertyData[] { };
5757
}
5858
}

ITHit.FileSystem.Samples.Common/FolderMetadataExt.cs renamed to Common/FolderMetadataExt.cs

File renamed without changes.

ITHit.FileSystem.Samples.Common/Settings.cs renamed to Common/Settings.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ public class Settings
5454
/// </summary>
5555
public string ProductName { get; set; }
5656

57-
/// <summary>
58-
/// Path to the folder that stores ETags, locks and other data associated with files and folders.
59-
/// </summary>
60-
public string ServerDataFolderPath { get; set; }
61-
6257
/// <summary>
6358
/// Automatically lock the file in remote storage when a file handle is being opened for writing, unlock on close.
6459
/// </summary>

Common/StreamCopy.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.IO;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ITHit.FileSystem.Samples.Common
8+
{
9+
/// <summary>
10+
/// Stream helper functions.
11+
/// </summary>
12+
public static class StreamCopy
13+
{
14+
15+
/// <summary>
16+
/// Asynchronously copies specified number of bytes from current stream to destination stream, using a specified buffer size.
17+
/// </summary>
18+
/// <param name="source">Source stream.</param>
19+
/// <param name="destination">The stream to which the contents of the current file stream will be copied.</param>
20+
/// <param name="bufferSize">The size, in bytes, of the buffer. This value must be greater than zero.</param>
21+
/// <param name="count">Number of bytes to copy.</param>
22+
public static async Task CopyToAsync(this Stream source, Stream destination, int bufferSize, long count)
23+
{
24+
byte[] buffer = new byte[bufferSize];
25+
int read;
26+
while (count > 0
27+
&& (read = await source.ReadAsync(buffer, 0, (int)Math.Min(buffer.LongLength, count))) > 0)
28+
{
29+
await destination.WriteAsync(buffer, 0, read);
30+
count -= read;
31+
}
32+
}
33+
}
34+
}

ITHit.FileSystem.Samples.Common/SynchronizationState.cs renamed to Common/SynchronizationState.cs

File renamed without changes.

ITHit.FileSystem.Samples.Common.Windows/ClientLockFailedException.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

ITHit.FileSystem.Samples.Common.Windows/CustomData.cs

Lines changed: 0 additions & 138 deletions
This file was deleted.

0 commit comments

Comments
 (0)