Esempio n. 1
0
 protected FolderAsset(FolderAsset parent, string name)
 {
     Name         = name;
     Parent       = parent;
     RelativePath = Path.Join(Parent.RelativePath, name);
     Directory.CreateDirectory(AbsolutePath);
 }
Esempio n. 2
0
 protected FileAsset(FolderAsset parent, string name, bool createIfNotExists)
 {
     Parent = parent;
     Name   = name;
     if (!File.Exists(AbsolutePath) && createIfNotExists)
     {
         File.Create(AbsolutePath).Dispose();
     }
 }
Esempio n. 3
0
 internal static FileAsset Create(FolderAsset parent, string name)
 {
     return(new(parent, name, true));
 }
Esempio n. 4
0
 internal static FileAsset FromPath(FolderAsset parent, string name)
 {
     return(new(parent, name, false));
 }