totem custo: new routes
This commit is contained in:
parent
721c0f9e7f
commit
c962998aaa
23 changed files with 335 additions and 167 deletions
|
|
@ -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 ());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue