/* * Copyright 1995, 2003 Perforce Software. All rights reserved. * * This file is part of Perforce - the FAST SCM System. */ /* * PathSys.h - OS specific pathnames * * Public classes: * * PathSys - a StrBuf with virtual path manipulations * * Public methods: * * StrBuf::Set() - set value in local syntax * StrBuf::Text() - get value in local syntax * * PathSys::SetCanon() - combine (local) root and canonical path * PathSys::SetLocal() - combine (local) root and local path * * If root is empty, local is used. * If local is empty, results are not defined. * If canonical path is empty, trailing slash is appended to path. * (Trailing slash might cause problems with Stat() on windows.) * Local can begin with relative references. * * PathSys::GetCanon() - strip root and return rest as canon * PathSys::ToParent() - strip (and return) last element of path * * NB: SetLocal() can take "this" as root, but SetCanon() cannot. * * Static functions: * * Create() - returns an appropriate PathSys, given an OS type flag. * GetOS() - returns a string for the OS name */ class PathSys : public StrBuf { public: virtual ~PathSys(); virtual void SetCanon( const StrPtr &root, const StrPtr &canon ) = 0; virtual void SetLocal( const StrPtr &root, const StrPtr &local ) = 0; virtual int GetCanon( const StrPtr &root, StrBuf &t ) = 0; virtual int ToParent( StrBuf *file = 0 ) = 0; virtual int IsUnderRoot( const StrPtr &root ) = 0; virtual void SetCharSet( int = 0 ); void Expand(); static PathSys *Create(); static PathSys *Create( const StrPtr &os, Error *e ); static const char *GetOS(); private: static PathSys *Create( int os ); } ;
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16129 | tjuricek |
Rename/move files again... this time to the hyphenated-approach. |
||
//guest/tjuricek/file_system_client/main/vendor/p4api-15.1/macosx105x86_64/include/p4/pathsys.h | |||||
#1 | 16119 | tjuricek | Rename/move to meet workshop project conventions. | ||
//guest/tjuricek/fsclient/vendor/p4api-15.1/macosx105x86_64/include/p4/pathsys.h | |||||
#1 | 16118 | tjuricek |
FSClient initial version: handles add, edit This is a proof-of-concept app that mirrors an existing Perforce workspace to handle running commands like "p4 add" and "p4 edit" automatically when your apps add and write files. See the readme for more information. |