/// <summary> /// Downloads the <paramref name="objectFile"/> from the <paramref name="vault"/>. /// </summary> /// <param name="objectFile">The file to download.</param> /// <param name="vault">The vault to download from.</param> /// <param name="blockSize">The size of blocks to use to transfer the file from the M-Files vault to this machine.</param> /// <param name="fileFormat">The format of file to request from server.</param> /// <returns>A <see cref="TemporaryFileDownload"/> representing the downloaded file.</returns> public TemporaryFileDownload DownloadFile ( ObjectFile objectFile, Vault vault, int blockSize = FileTransfers.DefaultBlockSize, MFFileFormat fileFormat = MFFileFormat.MFFileFormatNative ) { return(objectFile.Download ( vault, this.GenerateTemporaryFileInfo(objectFile), blockSize, fileFormat )); }
/// <summary> /// Downloads the file to disk. /// </summary> /// <param name="objectFile">The file to download.</param> /// <param name="vault">The vault to download from.</param> /// <param name="filePath">The location on disk to download to.</param> /// <param name="blockSize">The size of blocks to use to transfer the file from the M-Files vault to this machine.</param> /// <param name="fileFormat">The format of file to request from server.</param> /// <returns>A <see cref="TemporaryFileDownload"/> representing the completed file download.</returns> public static TemporaryFileDownload Download ( this ObjectFile objectFile, Vault vault, string filePath, int blockSize = FileTransfers.DefaultBlockSize, MFFileFormat fileFormat = MFFileFormat.MFFileFormatNative ) { return(objectFile .Download ( vault, new FileInfo(filePath), blockSize, fileFormat )); }