Overview

Namespaces

  • OpenCloud
    • Autoscale
      • Resource
    • CDN
      • Resource
    • CloudMonitoring
      • Collection
      • Exception
      • Resource
    • Common
      • Collection
      • Constants
      • Exceptions
      • Http
        • Message
      • Log
      • Resource
      • Service
    • Compute
      • Constants
      • Exception
      • Resource
    • Database
      • Resource
    • DNS
      • Collection
      • Resource
    • Identity
      • Constants
      • Resource
    • Image
      • Enum
      • Resource
        • JsonPatch
        • Schema
    • LoadBalancer
      • Collection
      • Enum
      • Resource
    • Networking
      • Resource
    • ObjectStore
      • Constants
      • Enum
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource
  • PHP

Classes

  • AbstractTransfer
  • ConcurrentTransfer
  • ConsecutiveTransfer
  • ContainerMigration
  • DirectorySync
  • TransferBuilder
  • TransferPart
  • TransferState
  • Overview
  • Namespace
  • Class
  • Tree

Class DirectorySync

DirectorySync upload class, in charge of creating, replacing and delete data objects on the API. The goal of this execution is to sync local directories with remote CloudFiles containers so that they are consistent.

Namespace: OpenCloud\ObjectStore\Upload
Package: OpenCloud\ObjectStore\Upload
Located at OpenCloud/ObjectStore/Upload/DirectorySync.php
Methods summary
public static OpenCloud\ObjectStore\Upload\DirectorySync
# factory( mixed $path, OpenCloud\ObjectStore\Resource\Container $container )

Basic factory method to instantiate a new DirectorySync object with all the appropriate properties.

Basic factory method to instantiate a new DirectorySync object with all the appropriate properties.

Parameters

$path
local path
$container
The container you're syncing

Returns

OpenCloud\ObjectStore\Upload\DirectorySync
DirectorySync
public
# setBasePath( mixed $path )

Parameters

$path

Throws

OpenCloud\Common\Exceptions\InvalidArgumentError
\OpenCloud\Common\Exceptions\InvalidArgumentError
public
# setRemoteFiles( OpenCloud\Common\Collection\ResourceIterator $remoteFiles )

Parameters

$remoteFiles
public
# setContainer( OpenCloud\ObjectStore\Resource\Container $container )

Parameters

$container
public
# execute( )

Execute the sync process. This will collect all the remote files from the API and do a comparison. There are four scenarios that need to be dealt with:

Execute the sync process. This will collect all the remote files from the API and do a comparison. There are four scenarios that need to be dealt with:

  • Exists locally, exists remotely (identical checksum) = no action
  • Exists locally, exists remotely (diff checksum) = local overwrites remote
  • Exists locally, not exists remotely = local is written to remote
  • Not exists locally, exists remotely = remote file is deleted
API documentation generated by ApiGen 2.8.0