Click or drag to resize

IStaticDirectory Interface

Describes a logical file in a static file system. This is used to abstract access to static files read from an assembly's embedded resources or potentially from other sources using Linux style paths.

This is currently used to emulate a tree of IStaticDirectory and IStaticFile instances loaded from an assembly's embedded resources via the GetResourceFileSystem(Assembly, String) extension method.

Note Note
IMPORTANT: Implementations need to be thread-safe.
Note Note
In general, file and directory name lookup case sensitivity should probably be case insensitive for most purposes but this is an implementation specific detail.

Namespace:  Neon.IO
Assembly:  Neon.Common (in Neon.Common.dll) Version: 2.14.0
Syntax
public interface IStaticDirectory

The IStaticDirectory type exposes the following members.

Properties
  NameDescription
Public propertyName
Returns the directory name.
Public propertyParent
Returns a reference to the parent directory or null if this is the root directory for a static file system.
Public propertyPath
Returns the fully qualified Linux style path for the static directory relative to the static root directory.
Top
Methods
  NameDescription
Public methodGetDirectories
Returns the directories beneath the current directory, optionally matching directories by name as well as optionally searching for directories recursively.
Public methodGetDirectory

Gets a directory via a Linux style path. This path can be absolute relative to the root directory or it can be relative to the current directory.

Note Note
Relative paths including /../ notation to move up a directory or ./ to specify the current directory are not supported.
Public methodGetFile

Gets a file via a Linux style path. This path can be absolute relative to the root directory or it can be relative to the current directory.

Note Note
Relative paths including /../ notation to move up a directory or ./ to specify the current directory are not supported.
Public methodGetFiles
Returns the files beneath the current directory, optionally matching files by name as well as optionally searching recursively searching subdirectories..
Top
Extension Methods
  NameDescription
Public Extension MethodZip(String, String, SearchOption, StaticZipOptions)Overloaded.
Creates a ZIP file, including the selected files from the static directory.
(Defined by IStaticDirectoryExtensions.)
Public Extension MethodZip(Stream, String, SearchOption, StaticZipOptions)Overloaded.
Writes a ZIP file to a stream, including the selected files from the static directory.
(Defined by IStaticDirectoryExtensions.)
Top
Thread Safety
Instance members of this type are safe for multi-threaded operations.
See Also