totem custo: new routes

This commit is contained in:
Paul Schneider 2015-10-10 23:23:04 +02:00
commit c962998aaa
23 changed files with 335 additions and 167 deletions

View file

@ -166,7 +166,7 @@ namespace Yavsc.Model.FileSystem
return (di.GetFiles ());
}
public IEnumerable<FileInfo> GetFiles (string username, string subdir)
public IEnumerable<FileInfo> GetFiles (string username, string subdir, bool createNonExistent = false)
{
string path = Prefix;
if (subdir != null) {
@ -174,6 +174,9 @@ namespace Yavsc.Model.FileSystem
path = Path.Combine (Prefix, subdir);
}
DirectoryInfo di = new DirectoryInfo (path);
if (createNonExistent)
if (!di.Exists)
di.Create ();
return (di.GetFiles ());
}