Ejemplo n.º 1
0
        public static string DownloadFileEx(StorageNode storageNode, string filename, string destDir, string destFileName = null)
        {
            string fullPath = null;

            if (destFileName == null)
            {
                IDictionary <string, string> metaData = GetMetaData(storageNode, filename);
                destFileName = metaData["Name"] + Path.GetExtension(filename);
            }
            fullPath = Path.Combine(destDir, destFileName);
            FDFSRequest storageRequest = DOWNLOAD_FILE.Instance.GetRequest(storageNode.EndPoint, 0L, 0L, storageNode.GroupName, filename);

            DOWNLOAD_FILE.ResponseEx storageResponse = new DOWNLOAD_FILE.ResponseEx(fullPath);
            storageRequest.GetResponse(storageResponse);
            return(storageResponse.FullPath);
        }
Ejemplo n.º 2
0
 public static string DownloadFileEx(StorageNode storageNode, string filename, string destDir, string destFileName = null)
 {
     string fullPath = null;
     if (destFileName == null)
     {
         IDictionary<string, string> metaData = GetMetaData(storageNode, filename);
         destFileName = metaData["Name"] + Path.GetExtension(filename);
     }
     fullPath = Path.Combine(destDir, destFileName);
     FDFSRequest storageRequest = DOWNLOAD_FILE.Instance.GetRequest(storageNode.EndPoint, 0L, 0L, storageNode.GroupName, filename);
     DOWNLOAD_FILE.ResponseEx storageResponse = new DOWNLOAD_FILE.ResponseEx(fullPath);
     storageRequest.GetResponse(storageResponse);
     return storageResponse.FullPath;
 }