public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { oStorageFileInfo = null; ErrorTypes eError = ErrorTypes.StorageGetInfo; try { string strFileKey = GetFilePath(strPath); using (Amazon.S3.AmazonS3 oS3Client = Amazon.AWSClientFactory.CreateAmazonS3Client(m_oRegion)) { Amazon.S3.Model.GetObjectMetadataRequest oRequest = new Amazon.S3.Model.GetObjectMetadataRequest() .WithBucketName(m_strBucketName).WithKey(strFileKey); using (Amazon.S3.Model.GetObjectMetadataResponse oResponse = oS3Client.GetObjectMetadata(oRequest)) { oStorageFileInfo = new StorageFileInfo(oResponse.ContentLength, oResponse.LastModified); eError = ErrorTypes.NoError; } } } catch { } return(eError); }
public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { oStorageFileInfo = null; ErrorTypes eError = ErrorTypes.NoError; try { FileInfo fi = new FileInfo(GetFilePath(strPath)); if (fi.Exists) { oStorageFileInfo = new StorageFileInfo(fi.Length, fi.LastWriteTimeUtc); } else { eError = ErrorTypes.StorageFileNoFound; } } catch { eError = ErrorTypes.StorageGetInfo; } return(eError); }
public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { oStorageFileInfo = null; ErrorTypes eError = ErrorTypes.NoError; try { FileInfo fi = new FileInfo(GetFilePath(strPath)); if (fi.Exists) oStorageFileInfo = new StorageFileInfo(fi.Length, fi.LastWriteTimeUtc); else eError = ErrorTypes.StorageFileNoFound; } catch { eError = ErrorTypes.StorageGetInfo; } return eError; }
public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { oStorageFileInfo = null; ErrorTypes eError = ErrorTypes.StorageGetInfo; try { string strFileKey = GetFilePath(strPath); using (Amazon.S3.AmazonS3 oS3Client = Amazon.AWSClientFactory.CreateAmazonS3Client(m_oRegion)) { Amazon.S3.Model.GetObjectMetadataRequest oRequest = new Amazon.S3.Model.GetObjectMetadataRequest() .WithBucketName(m_strBucketName).WithKey(strFileKey); using(Amazon.S3.Model.GetObjectMetadataResponse oResponse = oS3Client.GetObjectMetadata(oRequest)) { oStorageFileInfo = new StorageFileInfo(oResponse.ContentLength, oResponse.LastModified); eError = ErrorTypes.NoError; } } } catch { } return eError; }
public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { return oStorage.GetFileInfo(strPath, out oStorageFileInfo); }
public ErrorTypes GetFileInfo(string strPath, out StorageFileInfo oStorageFileInfo) { return(oStorage.GetFileInfo(strPath, out oStorageFileInfo)); }