Esempio n. 1
0
 /**
  * Perform synchronizing folder via FTP connection
  * @param string 	$path       Local path for synchronizing
  */
 protected function synchronize($path)
 {
     $this->remote->log('Synchronizing remote folder [##]', $path);
     // Check if we can read this path
     foreach ($this->directoryFiles($path) as $fileName => $fullPath) {
         // If this is a folder
         if (is_dir($fullPath)) {
             // Try to create it
             $this->remote->mkDir($fileName);
             // Go deeper in recursion
             $this->synchronize($fullPath);
         } elseif ($this->remote->isOld($fullPath)) {
             // Check if file has to be updated
             // Copy file to remote
             $this->remote->write($fullPath);
         }
     }
     // Go one level up
     $this->remote->cdup();
 }
Esempio n. 2
0
 public function testIsOld()
 {
     $this->assertEquals(false, $this->remote->isOld('test'));
 }