Revision 3c43ec9b trunk/Pithos.Interfaces/ICloudClient.cs
b/trunk/Pithos.Interfaces/ICloudClient.cs | ||
---|---|---|
1 | 1 |
using System; |
2 | 2 |
using System.Collections.Generic; |
3 | 3 |
using System.Diagnostics.Contracts; |
4 |
using System.IO; |
|
5 | 4 |
using System.Linq; |
6 | 5 |
using System.Text; |
7 | 6 |
using System.Threading.Tasks; |
... | ... | |
33 | 32 |
Task GetObject(string container, string objectName, string fileName); |
34 | 33 |
Task PutObject(string container, string objectName, string fileName, string hash = null); |
35 | 34 |
void DeleteObject(string container, string objectName); |
36 |
void MoveObject(string container, string oldObjectName, string newObjectName);
|
|
35 |
void MoveObject(string sourceContainer, string oldObjectName, string targetContainer,string newObjectName);
|
|
37 | 36 |
bool ObjectExists(string container,string objectName); |
38 | 37 |
ObjectInfo GetObjectInfo(string container, string objectName); |
39 | 38 |
void CreateFolder(string container, string folder); |
... | ... | |
156 | 155 |
Contract.Requires(!String.IsNullOrWhiteSpace(objectName)); |
157 | 156 |
} |
158 | 157 |
|
159 |
public void MoveObject(string container, string oldObjectName, string newObjectName)
|
|
158 |
public void MoveObject(string sourceContainer, string oldObjectName, string targetContainer,string newObjectName)
|
|
160 | 159 |
{ |
161 | 160 |
Contract.Requires(!String.IsNullOrWhiteSpace(Token)); |
162 | 161 |
Contract.Requires(StorageUrl!=null); |
163 |
Contract.Requires(!String.IsNullOrWhiteSpace(container));
|
|
162 |
Contract.Requires(!String.IsNullOrWhiteSpace(sourceContainer));
|
|
164 | 163 |
Contract.Requires(!String.IsNullOrWhiteSpace(oldObjectName)); |
164 |
Contract.Requires(!String.IsNullOrWhiteSpace(targetContainer)); |
|
165 | 165 |
Contract.Requires(!String.IsNullOrWhiteSpace(newObjectName)); |
166 | 166 |
} |
167 | 167 |
|
... | ... | |
202 | 202 |
|
203 | 203 |
public static ContainerInfo Empty=new ContainerInfo(); |
204 | 204 |
} |
205 |
|
|
206 |
public class ObjectInfo |
|
207 |
{ |
|
208 |
public string Name { get; set; } |
|
209 |
public string Hash { get; set; } |
|
210 |
public long Bytes { get; set; } |
|
211 |
public string Content_Type { get; set; } |
|
212 |
public DateTime Last_Modified { get; set; } |
|
213 |
|
|
214 |
private Dictionary<string, string> _tags=new Dictionary<string, string>(); |
|
215 |
public Dictionary<string, string> Tags |
|
216 |
{ |
|
217 |
get { return _tags; } |
|
218 |
set { _tags = value; } |
|
219 |
} |
|
220 |
|
|
221 |
public Stream Stream { get; set; } |
|
222 |
|
|
223 |
public static ObjectInfo Empty=new ObjectInfo {Name=String.Empty,Hash=String.Empty,Bytes=0,Content_Type=String.Empty,Last_Modified=DateTime.MinValue}; |
|
224 |
} |
|
225 | 205 |
} |
Also available in: Unified diff