Kinetica   C#   API  Version 7.2.3.1
FileOperationResult.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 
4 namespace kinetica.FileSystem;
5 
9  public enum OperationMode
10  {
12  Upload,
14  Download
15  }
16 
21  public class FileOperationResult
22  {
26  public string FileName { get; set; } = string.Empty;
27 
31  public IList<string> FileNames { get; set; } = new List<string>();
32 
36  public bool IsSuccessful { get; set; }
37 
41  public Exception? Exception { get; set; }
42 
46  public string? ErrorMessage { get; set; }
47 
51  public OperationMode OpMode { get; set; }
52 
56  public bool IsMultiPart { get; set; }
57 
61  public MultiPartUploadInfo? UploadInfo { get; set; }
62 
66  public MultiPartDownloadInfo? DownloadInfo { get; set; }
67 
71  public override string ToString()
72  {
73  return $"FileOperationResult {{ FileName='{FileName}', IsSuccessful={IsSuccessful}, OpMode={OpMode}, IsMultiPart={IsMultiPart}, ErrorMessage='{ErrorMessage}' }}";
74  }
75  }
76 
80  public class MultiPartUploadInfo
81  {
85  public string UploadUuid { get; set; } = string.Empty;
86 
90  public int PartNumber { get; set; }
91 
95  public int TotalParts { get; set; }
96 
100  public long PartSize { get; set; }
101  }
102 
107  {
111  public int PartNumber { get; set; }
112 
116  public int TotalParts { get; set; }
117 
121  public long PartSize { get; set; }
122 
126  public long Offset { get; set; }
127  }
OperationMode
Indicates the type of file operation.
long Offset
Gets or sets the offset in the file where this part starts.
int TotalParts
Gets or sets the total number of parts.
MultiPartDownloadInfo? DownloadInfo
Gets or sets information about a multi-part download operation.
long PartSize
Gets or sets the size of the current part in bytes.
Contains information about a multi-part download operation.
int TotalParts
Gets or sets the total number of parts.
long PartSize
Gets or sets the size of the current part in bytes.
MultiPartUploadInfo? UploadInfo
Gets or sets information about a multi-part upload operation.
int PartNumber
Gets or sets the current part number.
Upload operation.
bool IsMultiPart
Gets or sets whether this is a multi-part operation.
string FileName
Gets or sets the name of the file being uploaded/downloaded.
string? ErrorMessage
Gets or sets the error message, if any.
string UploadUuid
Gets or sets the UUID for the multi-part upload.
override string ToString()
Returns a string representation of this result.
IList< string > FileNames
Gets or sets the list of all file names for full file operations.
Download operation.
Contains information about a multi-part upload operation.
int PartNumber
Gets or sets the current part number.
bool IsSuccessful
Gets or sets whether the operation was successful.
Exception? Exception
Gets or sets the exception that occurred, if any.
Contains the result of a file upload or download operation.
OperationMode OpMode
Gets or sets the operation mode (upload or download).