How to call a custom function when Migration(Import) is done? I am using migration to import nodes from a csv.
I want to change the file name when import is done.
How can I call a custom function when Import/Migration is done from a specific file to change its name?

I knwo about the postimpot but I am looping thorugh directories to import data from each csv file in each directory. So postimport is called every time a file has been imported. But in posImport I cant use argument to change the last imported file name only.
use a static variable in postimport to do a check that you're on the last folder or task or the import, there has to be some value you can track. You could even set a variable of all the csv files to do (in-order) within your migration class -- and check which file you're on in postimport.