Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Files.C File Reference

#include "Files.H"
#include "EvalBasics.H"
#include "ModelState.H"
#include "Err.H"
#include <ReposUI.H>
#include <Replicator.H>

Go to the source code of this file.

Functions

void * opendir (const char *)
int closedir (void *)
bool IsDelimiter (const char c)
Text Canonical (const Text &path)
Text setSuffix (const Text &s, const Text &suff)
bool IsAbsolutePath (const Text &path)
void SplitPath (const Text &path, Text &prefix, Text &name)
VestaSource::errorCode LookupPath (const Text &path, VestaSource *mRoot, VestaSource *&newRoot)
TextSeq SplitDefaultMains (const Text &defaultmain) throw ()
Text FindExistingModel (const TextSeq &p_defaults, const Text &p_dir="")
Text MainModel (const Text &filename, const Text &defaultmain)
bool IsDirectory (VestaSource *mRoot, Text &path, VestaSource *&vSource, VestaSource::errorCode &vSourceErr)
bool OpenSource (VestaSource *mRoot, const Text &fname, SrcLoc *loc, fstream *&iFile, VestaSource *&newRoot, ShortId &shortId, VestaSource *&vSource)
bool ReplicateMissing (VestaSource *root, const Text &name, VestaSource *&vSource)

Variables

const char UnixDelimiter = '/'


Function Documentation

Text Canonical const Text path  ) 
 

Definition at line 42 of file Files.C.

References Text::cchars(), IsDelimiter(), Text::Length(), NEW_PTRFREE_ARRAY, and UnixDelimiter.

Referenced by MainModel().

int closedir void *   ) 
 

Referenced by AcquireShortIdBlock(), CleanDir(), MainModel(), and DirIter::Next().

Text FindExistingModel const TextSeq p_defaults,
const Text p_dir = ""
 

Definition at line 146 of file Files.C.

References FS::Exists(), Sequence< Elem, elem_ptrfree >::get(), and Sequence< Elem, elem_ptrfree >::size().

Referenced by MainModel().

bool IsAbsolutePath const Text path  ) 
 

Definition at line 70 of file Files.C.

References IsDelimiter().

Referenced by ModelEC::ImportLocalModel(), LookupPath(), and ModelVC::ModelVC().

bool IsDelimiter const char  c  ) 
 

Definition at line 38 of file Files.C.

Referenced by Canonical(), FileEC::Eval(), IsAbsolutePath(), Lookup(), LookupPath(), MainModel(), ModelPath(), setSuffix(), and SplitPath().

bool IsDirectory VestaSource mRoot,
Text path,
VestaSource *&  vSource,
VestaSource::errorCode vSourceErr
 

Definition at line 203 of file Files.C.

References VestaSource::immutableFile, LookupPath(), VestaSource::mutableFile, VRErrorCode::ok, and VestaSource::type.

VestaSource::errorCode LookupPath const Text path,
VestaSource mRoot,
VestaSource *&  newRoot
 

Definition at line 82 of file Files.C.

References autoRepl, Text::cchars(), Text::Empty(), IsAbsolutePath(), IsDelimiter(), Text::Length(), VestaSource::lookupPathname(), VRErrorCode::notFound, VRErrorCode::ok, ReplicateMissing(), rRoot, and Text::Sub().

Referenced by IsDirectory(), OpenSource(), Tags(), PickleC::UnpickleDPS(), and PickleC::UnpickleVal().

Text MainModel const Text filename,
const Text defaultmain
 

Definition at line 162 of file Files.C.

References Canonical(), Text::cchars(), closedir(), FindExistingModel(), IsDelimiter(), Text::Length(), opendir(), PathnameSep, setSuffix(), and SplitDefaultMains().

Referenced by main().

void* opendir const char *   ) 
 

Referenced by AcquireShortIdBlock(), CleanDir(), AtomicFile::cleanup(), DirIter::DirIter(), and MainModel().

bool OpenSource VestaSource mRoot,
const Text fname,
SrcLoc loc,
fstream *&  iFile,
VestaSource *&  newRoot,
ShortId shortId,
VestaSource *&  vSource
 

Definition at line 211 of file Files.C.

References Text::cchars(), Error(), Basics::mutex::lock(), VestaSource::lookup(), LookupPath(), NullShortId, VRErrorCode::ok, outputMu, VestaSource::shortId(), FS::SplitPath(), Basics::mutex::unlock(), and VestaSourceErrorMsg().

Referenced by Interpret(), and ModelVC::ModelVC().

bool ReplicateMissing VestaSource root,
const Text name,
VestaSource *&  vSource
 

Definition at line 239 of file Files.C.

References autoRepl, ReposUI::errorCodeText(), ReposUI::filenameToRealVS(), ReposUI::filenameToVS(), VestaConfig::get(), VestaSource::host(), LongId::isAncestorOf(), Basics::mutex::lock(), VestaSource::longid, outputMu, VestaSource::port(), RootLongId, rRoot, Text::Sub(), Basics::mutex::unlock(), and ReposUI::vsToFilename().

Referenced by LookupPath().

Text setSuffix const Text s,
const Text suff
 

Definition at line 59 of file Files.C.

References IsDelimiter(), and Text::Length().

Referenced by FileEC::Eval(), and MainModel().

TextSeq SplitDefaultMains const Text defaultmain  )  throw ()
 

Definition at line 112 of file Files.C.

References Sequence< Elem, elem_ptrfree >::addhi().

Referenced by MainModel().

void SplitPath const Text path,
Text prefix,
Text name
 

Definition at line 74 of file Files.C.

References IsDelimiter(), Text::Length(), and Text::Sub().


Variable Documentation

const char UnixDelimiter = '/'
 

Definition at line 36 of file Files.C.

Referenced by Canonical().


Generated on Mon May 8 00:49:02 2006 for Vesta by  doxygen 1.4.2