FileMapper : A way to change file or folder names

A fileMapper is a JSON file inside the S3 bucket with key-name mappings.

It is fully available on version 2.

It can map file to file, or folder to folder.

This mapping logic should cover all possible scenarios needed.

A valid folder-path inside S3 can be mapped to a generic folder-path name outside. The original file names are preserved in this case but the folder path changes.

A valid file-path name inside S3 can also be mapped to a generic file-path name outside.

Anything is possible with this option because it is possible to alter both the folder name and the file name on the file path.

Please experiment.

Below is an example of a fileMapper.

{
“paths”:
[
{ “key”:“bucket/files/systemd”, “name”:"/mysytem.txt" },
{ “key”:“bucket/files/bird.png”, “name”:"/home/birds/greys/greybird.png" },
{ “key”:“bucket/files/small.txt”, “name”:"/home/files/small.txt" },
{ “key”:“bucket/files/”, “name”:"/home" },
{ “key”:“bucket/files/”, “name”:"/" }
]
}

Thanks,

1 Like