NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class KeyConverter

Converts filenames from one system to another

  Aws\S3\Sync\KeyConverter implements Aws\S3\Sync\FilenameConverterInterface

Namespace: Aws\S3\Sync
Located at Aws/S3/Sync/KeyConverter.php

## Methods summary

- `public` `__construct ( string $baseDir = '', string $prefix = '', string $delimiter = '/' )`
- `public` `convert ( string $filename )`

  Convert a filename

## Methods detail

# `public`
`__construct( string $baseDir = '', string $prefix = '', string $delimiter = '/' )`

#### Parameters

$baseDir
  `string`
  $baseDir Base directory to remove from each converted name
$prefix
  `string`
  $prefix Amazon S3 prefix
$delimiter
  `string`
  $delimiter Directory separator used with generated names

# `public string`
`convert( string $filename )`

Convert a filename

#### Parameters

$filename
  `string`
  $filename Name of the file to convert

#### Returns

`string`

#### Implementation of

`Aws\S3\Sync\FilenameConverterInterface::convert()`

### Magic methods summary

## Properties summary

`protected string` | $delimiter | # Directory separator for Amazon S3 keys
`protected string` | $prefix | # Prefix to prepend to each Amazon S3 object key
`protected string` | $baseDir | # Base directory to remove from each file path before converting to an object key