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()
            };
        }
Example #3
0
        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()
            });
        }
Example #4
0
 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())
     };
 }