MTrack/SCMWorkingCopy.php
authorAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 08:27:19 +0000 (16:27 +0800)
committerAlan Knowles <alan@akbkhome.com>
Tue, 6 Sep 2011 08:27:19 +0000 (16:27 +0800)
MTrack/SCMWorkingCopy.php

index 63c7746..348fb69 100644 (file)
@@ -2,38 +2,38 @@
 require_once 'MTrack/Changeset.php';
 
 abstract class MTrackSCMWorkingCopy {
-  public $dir;
-
-  /** returns the root dir of the working copy */
-  function getDir() {
-    return $this->dir;
-  }
-
-  /** add a file to the working copy */
-  abstract function addFile($path);
-  /** removes a file from the working copy */
-  abstract function delFile($path);
-  /** commit changes that are pending in the working copy */
-  abstract function commit(MTrackChangeset $CS);
-  /** get an MTrackSCMFile representation of a file */
-  abstract function getFile($path);
-
-  /** enumerates files in a path in the working copy */
-  function enumFiles($path)
-  {
-    return scandir($this->dir . DIRECTORY_SEPARATOR . $path);
-  }
-
-  /** determines if a file exists in the working copy */
-  function file_exists($path)
-  {
-    return file_exists($this->dir . DIRECTORY_SEPARATOR . $path);
-  }
-
-  function __destruct()
-  {
-    if (strlen($this->dir) > 1) {
-      mtrack_rmdir($this->dir);
+    public $dir;
+  
+    /** returns the root dir of the working copy */
+    function getDir() {
+        return $this->dir;
+    }
+  
+    /** add a file to the working copy */
+    abstract function addFile($path);
+    /** removes a file from the working copy */
+    abstract function delFile($path);
+    /** commit changes that are pending in the working copy */
+    abstract function commit(MTrackChangeset $CS);
+    /** get an MTrackSCMFile representation of a file */
+    abstract function getFile($path);
+  
+    /** enumerates files in a path in the working copy */
+    function enumFiles($path)
+    {
+        return scandir($this->dir . DIRECTORY_SEPARATOR . $path);
+    }
+  
+    /** determines if a file exists in the working copy */
+    function file_exists($path)
+    {
+      return file_exists($this->dir . DIRECTORY_SEPARATOR . $path);
+    }
+  
+    function __destruct()
+    {
+      if (strlen($this->dir) > 1) {
+        mtrack_rmdir($this->dir);
+      }
     }
-  }
 }