Overview
  • Namespace
  • Class

Namespaces

  • OpenCloud
    • Autoscale
      • 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
      • Exception
      • Resource
      • Upload
    • Orchestration
      • Resource
    • Queues
      • Collection
      • Exception
      • Resource
    • Volume
      • Resource

Classes

  • AbstractTransfer
  • ConcurrentTransfer
  • ConsecutiveTransfer
  • ContainerMigration
  • DirectorySync
  • TransferBuilder
  • TransferPart
  • TransferState

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( $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
public
# setBasePath( $path )

Parameters

$path

Throws

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

Magic methods summary

API documentation generated by ApiGen