/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for Additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
/* ================================================================
* About NPOI
* Author: Tony Qu
* Author's email: tonyqus (at) gmail.com
* Author's Blog: tonyqus.wordpress.com.cn (wp.tonyqus.cn)
* HomePage: http://www.codeplex.com/npoi
* Contributors:
*
* ==============================================================*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using HH.WMS.Utils.NPOI.Util;
using HH.WMS.Utils.NPOI.POIFS.EventFileSystem;
namespace HH.WMS.Utils.NPOI.POIFS.FileSystem
{
///
/// This interface defines methods specific to Directory objects
/// managed by a Filesystem instance.
/// @author Marc Johnson (mjohnson at apache dot org)
///
public interface DirectoryEntry : Entry
{
///
/// get an iterator of the Entry instances contained directly in
/// this instance (in other words, children only; no grandchildren
/// etc.)
///
/// The entries.never null, but hasNext() may return false
/// immediately (i.e., this DirectoryEntry is empty). All
/// objects retrieved by next() are guaranteed to be
/// implementations of Entry.
IEnumerator Entries { get; }
///
///is this DirectoryEntry empty?
///
/// true if this instance contains no Entry instances; otherwise, false.
bool IsEmpty { get; }
///
/// find out how many Entry instances are contained directly within
/// this DirectoryEntry
///
/// number of immediately (no grandchildren etc.) contained
/// Entry instances
int EntryCount{get;}
///
/// get a specified Entry by name
///
/// the name of the Entry to obtain.
/// the specified Entry, if it is directly contained in
/// this DirectoryEntry
Entry GetEntry(String name);
///
/// Create a new DocumentEntry
///
/// the name of the new DocumentEntry
/// the Stream from which to Create the new DocumentEntry
/// the new DocumentEntry
DocumentEntry CreateDocument(String name,
Stream stream);
///
/// Create a new DocumentEntry; the data will be provided later
///
/// the name of the new DocumentEntry
/// the size of the new DocumentEntry
/// the new DocumentEntry
//DocumentEntry CreateDocument(String name, int size);
///
/// Create a new DocumentEntry; the data will be provided later
///
/// the name of the new DocumentEntry
/// the size of the new DocumentEntry
/// BeforeWriting event handler
/// the new DocumentEntry
DocumentEntry CreateDocument(string name, int size, POIFSWriterListener writer);
///
/// Create a new DirectoryEntry
///
/// the name of the new DirectoryEntry
/// the name of the new DirectoryEntry
DirectoryEntry CreateDirectory(String name);
///
/// Gets or sets the storage ClassID.
///
/// The storage ClassID.
ClassID StorageClsid { get; set; }
}
}