// // Created by Tristan Juricek on 9/19/15. // #ifndef FSCLIENT_WORKSPACE_H #define FSCLIENT_WORKSPACE_H #include <string> class WorkspaceImpl; // Maintains information about where our backing p4 workspace is, and just // simplifies logic of path handling class Workspace { public: ~Workspace(); Workspace(); Workspace(const std::string & workspace); void setWorkspace(std::string & w) { _workspace = w; } const std::string & workspace() const { return _workspace; } std::string path(const std::string & p) const; int add(const char *path); // Marks the file for "edit". int edit(const char * path); int rename(const char * from, const char * to); //----------------------------------------------------------------------- // Failure codes //----------------------------------------------------------------------- static const int CONNECTION_FAILURE = -1; static const int COMMAND_FAILURE = -2; private: std::string _workspace; WorkspaceImpl* _impl; }; #endif //FSCLIENT_WORKSPACE_H
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 16129 | tjuricek |
Rename/move files again... this time to the hyphenated-approach. |
||
#1 | 16119 | tjuricek | Rename/move to meet workshop project conventions. | ||
//guest/tjuricek/fsclient/Workspace.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. |