Exemplo n.º 1
0
 protected ElementNode(FsDataStorage storage, StoragePath path, FolderNode?parent)
 {
     Storage    = storage;
     Parent     = parent;
     Path       = path.FullPath;
     ModifiedOn = CreatedOn = DateTimeOffset.Now;
 }
Exemplo n.º 2
0
        public static FileNode Create(FsDataStorage storage, StoragePath path)
        {
            var parentNode = storage.GetParentNodeAndRequirePathToHaveParent(path);
            var node       = new FileNode(storage, path, parentNode);

            storage.RegisterNode(node);
            parentNode.RegisterChildNode(node);
            return(node);
        }
Exemplo n.º 3
0
        public static FolderNode Create(FsDataStorage storage, StoragePath path)
        {
            var parentNode = storage.GetParentNode(path);
            var node       = new FolderNode(storage, path, parentNode);

            storage.RegisterNode(node);
            parentNode?.RegisterChildNode(node);
            return(node);
        }
Exemplo n.º 4
0
 private FileNode(FsDataStorage storage, StoragePath path, FolderNode parent)
     : base(storage, path, parent)
 {
     Content    = new FileContent(ownerFileNode: this);
     Attributes = FileAttributes.Normal;
 }
Exemplo n.º 5
0
 private FolderNode(FsDataStorage storage, StoragePath path, FolderNode?parent)
     : base(storage, path, parent)
 {
     Attributes = FileAttributes.Directory | FileAttributes.Normal;
 }