### IFileSystemCopier

  This class copies a file system entity. If the file system entity is a directory, it copies all of the entity's children.

#### Subclassing

  Developers who want to perform copies with progress reports, name conflict resolution, or customized error handling must create a subclass and override one or more of the callback member functions declared in IFileOperation.

### IFileSystemCopier - Member Functions and Data by Group

### Constructors & Destructor

Construct, destruct, copy, and assign file system copier objects.

~IFileSystemCopier

      public:
      virtual ~IFileSystemCopier()

  Destroys a file system copier object.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

IFileSystemCopier

      public:
      IFileSystemCopier( EFailureAction action = kStop,
                         unsigned int tellMeTimes = 0 )

  Constructs a file system copier object.

  action
    What to do if the operation encounters an error. See IFileSystemCopier::EFailureAction for details.
  tellMeTimes
    The number of times that reportProgress should be called during the copy operation.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### Copy Operations

This function implements the copier operation.

copy

      public:
      IFileSystemEntity
        copy( const IFileSystemEntity& source,
              IDirectory& destination,
              const IFileName& newName = "" )

  Copies an entity to a new parent directory. If the entity is a directory, all of its children are copied as well. The error handling and progress reporting behavior of the copy depends on the arguments that were passed to this object's constructor.

  source
    The entity to be copied.
  destination
    The directory to which this entity should be copied.
  newName
    An optional new name for the resulting entity. If no new name is provided, the current name is used.

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### File Operation Callback Functions

This operation is overridden to handle callbacks from the base class.

doOneEntity

      protected:
      virtual IFileSystemEntity
        doOneEntity( const IFileSystemEntity& entity,
                     IDirectory& destination,
                     const IFileName& newName )

Supported Platforms

  Windows | OS/2 | AIX
  Yes | Yes | Yes

### IFileSystemCopier - Inherited Member Functions and Data

#### Inherited Public Functions

  IFileOperation

  -     virtual ~IFileOperation()

  -     EFailureAction failureAction() const

  -     virtual bool
          handleFailure( const IException& reason,
                         const IFileSystemEntity& current )

  -     virtual bool
          renameNeeded( IFileName& modifyThisName,
                        const IFileSystemEntity& currentEntity )

  -     unsigned int reportFrequency() const

  -     virtual bool
          reportProgress( double fractionDone,
                          const IFileSystemEntity& currentEntity )

  -     void setFailureAction(EFailureAction actionOnFailure)

#### Inherited Public Data

  - None

#### Inherited Protected Functions

  IFileOperation

  -     virtual IDirectory
          doOneDirectory( const IDirectory& dir,
                          IDirectory& dest,
                          const IFileName& newName )

  -     virtual IFileSystemEntity
          doOneEntity( const IFileSystemEntity& entity,
                       IDirectory& target,
                       const IFileName& newName ) = 0

  -     IFileSystemEntity
          execute( const IFileSystemEntity& entity,
                   IDirectory& target,
                   const IFileName& newName )

  -     IFileOperation( EFailureAction action,
                        unsigned int tellMeTimes )

  -     IFileOperation()

  -     virtual void
          postProcess( IFileSystemEntity& source,
                       IFileSystemEntity& result )

#### Inherited Protected Data

  - None