예제 #1
0
파일: File.php 프로젝트: nsine/webmail-lite
 public function delete()
 {
     parent::delete();
     $oDirectory = $this->getDirectory();
     $oDirectory->updateQuota();
 }
예제 #2
0
파일: File.php 프로젝트: sebbie42/casebox
 /**
  * Constructor
  *
  * @param string $path on-disk path.
  * @param array $acl ACL rules.
  * @param string|null $owner principal owner string.
  */
 function __construct($path, array $acl, $owner = null)
 {
     parent::__construct($path);
     $this->acl = $acl;
     $this->owner = $owner;
 }
예제 #3
0
 /**
  * @depends testUpdatePropertiesMove
  */
 function testUpdatePropertiesDeleteBleed()
 {
     $file = new File(SABRE_TEMPDIR . '/dir/file.txt');
     $mutations = array('{http://sabredav.org/NS/2010}test1' => 'foo', '{http://sabredav.org/NS/2010}test2' => 'bar');
     $propPatch = new PropPatch($mutations);
     $file->propPatch($propPatch);
     $result = $propPatch->commit();
     $this->assertEquals(true, $result);
     $properties = $file->getProperties(array('{http://sabredav.org/NS/2010}test1', '{http://sabredav.org/NS/2010}test2', '{http://sabredav.org/NS/2010}test3'));
     $this->assertEquals(array('{http://sabredav.org/NS/2010}test1' => 'foo', '{http://sabredav.org/NS/2010}test2' => 'bar'), $properties);
     // Deleting
     $file->delete();
     $this->assertFalse(file_exists(SABRE_TEMPDIR . '/dir/file.txt'));
     // Creating it again
     file_put_contents(SABRE_TEMPDIR . '/dir/file.txt', 'New Contents');
     $file = new File(SABRE_TEMPDIR . '/dir/file.txt');
     $properties = $file->getProperties(array('http://sabredav.org/NS/2010}test1', '{http://sabredav.org/NS/2010}test2', '{http://sabredav.org/NS/2010}test3'));
     $this->assertEquals(array(), $properties);
 }
예제 #4
0
파일: File.php 프로젝트: afterlogic/dav
 public function delete()
 {
     parent::delete();
     $this->deleteResourceData();
     $this->getDirectory()->updateQuota();
 }
예제 #5
0
 function testGetSize()
 {
     $file = new File(SABRE_TEMPDIR . '/file.txt');
     $this->assertEquals(8, $file->getSize());
 }