2 require_once 'MTrack/Changeset.php';
4 abstract class MTrack_SCM_WorkingCopy {
7 /** returns the root dir of the working copy */
12 /** add a file to the working copy */
13 abstract function addFile($path);
14 /** removes a file from the working copy */
15 abstract function delFile($path);
16 /** commit changes that are pending in the working copy */
17 abstract function commit(MTrackChangeset $CS);
18 /** get an MTrackSCMFile representation of a file */
19 abstract function getFile($path);
21 /** enumerates files in a path in the working copy */
22 function enumFiles($path)
24 return scandir($this->dir . DIRECTORY_SEPARATOR . $path);
27 /** determines if a file exists in the working copy */
28 function file_exists($path)
30 return file_exists($this->dir . DIRECTORY_SEPARATOR . $path);
35 if (strlen($this->dir) > 1) {
36 require_once 'System.php';
37 echo "rmdir {$this->dir}";
39 //System::rmdir($this->dir, '-r');
42 function generateTempDir()
44 $tn = tempnam(ini_get('session.save_path'),'mtrackworkingdir');