Classes | Typedefs | Enumerations | Functions

nstream Namespace Reference

Classes

class  Stream
 an instance of a read-only stream More...
class  Entry
 a generic entry in the namespace. This is either a Folder or File More...
class  File
 an atom in the namespace: a File is a named object from which you can request read-only streams. More...
class  Folder
 a folder in the namespace: contains other stream::Entry objects. More...
class  Manager
 the object that manages a particular space of named streams More...

Typedefs

typedef eIterationFlag(* visit_entry_fn )(Entry *entry, void *context)
 callback for nstream::walkChildFolders()

Enumerations

enum  eIterationFlag {
  eIterate_Continue = 1,
  eIterate_Stop = 2,
  eIterate_Invalid = 0
}
 

used by nstream::walkChildFolders() callback

More...

Functions

static smart_ptr< EntrygetEntryForName (const char *name, const char *rootDir)
static std::string getFullPath (const char *rootDir, const char *name)
smart_ptr< ManagergetFilesystemManager (const char *root_dir)
 A reference nstream::Manager implementation: this API provides a namespace object based on the local filesystem.
static eIterationFlag maybeVisit (Entry *entry, visit_entry_fn callback, void *context, const SetString *extensions, const char *filter, bool visitHidden)
smart_ptr< StreamgetStreamRelativeTo (Stream *startStream,const char *relativePath)
 Helper method: given a Stream object, and a path relative to that stream path, return a stream for that.
smart_ptr< StreamopenNamedStream (Manager *mgr,const char *name)
 Helper method: open a Stream for a given path on the specified Manager.
std::string getStreamName (Stream *stream)
 Helper method: given a Stream, return its name.
eIterationFlag walkChildFolders (Folder *root,visit_entry_fn callback,void *context,const SetString *extensions=NULL,const char *filter=NULL,bool visitHidden=false)
 helper methods: given a Folder, walk all child Folders and Entries recursively.

Function Documentation

static smart_ptr< Entry > nstream::getEntryForName ( const char *  name,
const char *  rootDir 
) [static]

Definition at line 476 of file fs-nstream.cpp.

static std::string nstream::getFullPath ( const char *  rootDir,
const char *  name 
) [static]

Definition at line 52 of file fs-nstream.cpp.

static eIterationFlag nstream::maybeVisit ( Entry *  entry,
visit_entry_fn  callback,
void *  context,
const SetString extensions,
const char *  filter,
bool  visitHidden 
) [static]

Definition at line 62 of file nstream.cpp.