Пример #1
0
        /// <summary>
        /// Create a new DirectoryEntry
        /// </summary>
        /// <param name="name">the name of the new DirectoryEntry</param>
        /// <returns>the name of the new DirectoryEntry</returns>
        public DirectoryEntry CreateDirectory(String name)
        {
            DirectoryProperty property = new DirectoryProperty(name);
            DirectoryNode     rval     = new DirectoryNode(property, _filesystem,
                                                           this);

            (( DirectoryProperty )Property).AddChild(property);
            _filesystem.AddDirectory(property);
            _entries[name] = rval;
            return(rval);
        }
Пример #2
0
        /// <summary>
        /// Create a new DirectoryEntry
        /// </summary>
        /// <param name="name">the name of the new DirectoryEntry</param>
        /// <returns>the name of the new DirectoryEntry</returns>
        public DirectoryEntry CreateDirectory(String name)
        {
            DirectoryProperty property = new DirectoryProperty(name);
            DirectoryNode     rval;

            if (_oFilesSystem != null)
            {
                rval = new DirectoryNode(property, _oFilesSystem, this);
                _oFilesSystem.AddDirectory(property);
            }
            else
            {
                rval = new DirectoryNode(property, _nFilesSystem, this);
                _nFilesSystem.AddDirectory(property);
            }

            ((DirectoryProperty)Property).AddChild(property);
            _entries.Add(rval);
            _byname[name] = rval;

            return(rval);
        }