private MediaFile BuildMediaFile(string relativePath, IStorageFile file) { return(new MediaFile { Name = file.GetName(), Size = file.GetSize(), LastUpdated = file.GetLastUpdated(), Type = file.GetFileType(), FolderName = relativePath, MediaPath = GetMediaPublicUrl(relativePath, file.GetName()) }); }
private static FileData GetFileData(IStorageFile file) { if (file == null) return null; var lastUpdate = file.GetLastUpdated(); return new FileData { Name = file.GetName(), VirtualPath = "/" + file.GetPath(), Created = lastUpdate, Updated = lastUpdate, Length = file.GetSize() }; }
private static FileData GetFileData(IStorageFile file) { if (file == null) { return(null); } var lastUpdate = file.GetLastUpdated(); return(new FileData { Name = file.GetName(), VirtualPath = "/" + file.GetPath(), Created = lastUpdate, Updated = lastUpdate, Length = file.GetSize() }); }
private MediaFile BuildMediaFile(string relativePath, IStorageFile file) { return new MediaFile { Name = file.GetName(), Size = file.GetSize(), LastUpdated = file.GetLastUpdated(), Type = file.GetFileType(), FolderName = relativePath, MediaPath = GetMediaPublicUrl(relativePath, file.GetName()) }; }