This commit is contained in:
Paul Schneider 2016-06-07 14:32:43 +02:00
commit fa34ed249b
233 changed files with 4000 additions and 1396 deletions

View file

@ -0,0 +1,23 @@
using System.IO;
using Microsoft.AspNet.FileProviders;
using Yavsc.Models;
namespace Yavsc.Helpers
{
public static class FileSystemHelpers {
public static IDirectoryContents GetFileContent(this Estimate estimate, string userFileDir)
{
if (estimate?.Command?.PerformerProfile?.Performer == null)
return null;
var fsp = new PhysicalFileProvider(
Path.Combine(
userFileDir,
estimate.Command.PerformerProfile.Performer.UserName
));
return fsp.GetDirectoryContents(
Path.Combine(Constants.UserBillsFilesDir, estimate.Id.ToString())
);
}
}
}