I am trying to retrieve all images in the specific folder,For that I created a vector and move that images to that vector, the code I used is

imageNameVector.removeAllElements();
...