public function deleteDeliveryDirectory(core_kernel_classes_Resource $assembly)
    {
        $success = true;
        $deleted = 0;
        $directories = $assembly->getPropertyValues(new core_kernel_classes_Property(self::PROPERTY_DELIVERY_DIRECTORY));

        foreach ($directories as $directory) {
            $instances = $this->getRootClass()->getInstances(true, array(self::PROPERTY_DELIVERY_DIRECTORY => $directory));
            unset($instances[$assembly->getUri()]);
            if (empty($instances)) {
                $success = $this->getFileStorage()->deleteDirectoryById($directory) ? $success : false;
                $deleted++;
            }
        }
        \common_Logger::i('(' . (int) $deleted. ') deletions for delivery assembly: ' . $assembly->getUri());
        return $success;
    }
public function deleteDeliveryDirectory(core_kernel_classes_Resource $assembly)
    {
        $success = true;
        $deleted = 0;
        $directories = $assembly->getPropertyValues(new core_kernel_classes_Property(self::PROPERTY_DELIVERY_DIRECTORY));

        foreach ($directories as $directory) {
            $instances = $this->getRootClass()->getInstances(true, array(self::PROPERTY_DELIVERY_DIRECTORY => $directory));
            unset($instances[$assembly->getUri()]);
            if (empty($instances)) {
                $success = $this->getFileStorage()->deleteDirectoryById($directory) ? $success : false;
                $deleted++;
            }
        }
        \common_Logger::i('(' . (int) $deleted. ') deletions for delivery assembly: ' . $assembly->getUri());
        return $success;
    }
public function deleteDeliveryDirectory ( core_kernel_classes_Resource $ assembly ) { $ success = true ; $ deleted = 0 ; $ directories = $ assembly -> getPropertyValues ( new core_kernel_classes_Property ( self :: PROPERTY_DELIVERY_DIRECTORY ) ) ; foreach ( $ directories as $ directory ) { $ instances = $ this -> getRootClass ( ) -> getInstances ( true , array ( self :: PROPERTY_DELIVERY_DIRECTORY => $ directory ) ) ; unset ( $ instances [ $ assembly -> getUri ( ) ] ) ; if ( empty ( $ instances ) ) { $ success = $ this -> getFileStorage ( ) -> deleteDirectoryById ( $ directory ) ? $ success : false ; $ deleted ++ ; } } \ common_Logger :: i ( '(' . ( int ) $ deleted . ') deletions for delivery assembly: ' . $ assembly -> getUri ( ) ) ; return $ success ; }
Delete directories related to a delivery, don't remove if dir is used by another delivery

@param core_kernel_classes_Resource $assembly
@return bool
Delete directories related to a delivery don t remove if dir is used by another delivery