Exemple #1
0
 /**
  * @test
  */
 function sync_with_check_time()
 {
     $syncFrom = __DIR__ . '/sync-test';
     $syncTo = __DIR__ . '/sync-done';
     if (!file_exists($syncTo)) {
         mkdir($syncTo, 0777);
     }
     file_put_contents($syncTo . '/test0.txt', 'tested time stamp update');
     $sync = new FlySync(FlySystems::local($syncFrom), FlySystems::local($syncTo));
     $sync->checkTimeStamp();
     $sync->syncDir('/');
     $this->assertEquals('tested time stamp update', file_get_contents($syncTo . '/test0.txt'));
 }
Exemple #2
0
 /**
  * @param string $storage
  * @return $this
  */
 public function local($storage)
 {
     $this->fileSystem = FlySystems::local($storage);
     return $this;
 }