Add abstract file traversal logic

Change-Id: I8a9f1e4ebe49665024ba7a7af6a9013c12ab2e71