Add setDirPath method in Component