There's no reason for this to be a class. It should just be a function that takes the directory and ending.