-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileChunk.cs
More file actions
28 lines (27 loc) · 994 Bytes
/
FileChunk.cs
File metadata and controls
28 lines (27 loc) · 994 Bytes
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace MurrayGrant.MassiveSort
{
public class FileChunk
{
public FileChunk(FileInfo fi, int chunkNumber, long startOffset, long endOffset)
{
this.FullPath = fi.FullName;
this.Name = fi.Name;
this.ChunkNumberInFile = chunkNumber;
this.StartOffset = startOffset;
this.EndOffset = endOffset;
}
public readonly string FullPath;
public readonly string Name;
public readonly int ChunkNumberInFile;
public string NameForProgress { get { return this.Name + (this.ChunkNumberInFile > 0 ? " #" + this.ChunkNumberInFile.ToString() : ""); } }
public readonly long StartOffset;
public readonly long EndOffset;
public long Length { get { return this.EndOffset - this.StartOffset; } }
}
}