Customizing file renaming

Image files can be renamed during transfer as described in chapter Change image names. To adust the implemented rename logic a custom class implementing interface FileRenamer can be created.

How file renaming is implemented

Class com.lightdev.app.albumhelper.kernel.FileCopyDispatcher is used to transfer image files. FileCopyDispatcher uses class ImageFileRenamer to rename image files during transfer by default.

Changing file renaming

To implement a different way of renaming files

  1. create a new class implementing interface FileRenamer

  2. override method renameFile to rename files in the required way

  3. use method setFileRenamer to set your custom FileRenamer prior to the call to FileCopyDispatcher.start()

Method start of class FileCopyDispatcher normally is called in class com.lightdev.app.albumhelper.action.StartAction. Adjust method doTransfer of class StartAction when using a custom FileRenamer.

See also

Inside Photo Album Helper

Change image names

Transferring images