Hide difference between directory and file
New function call that finds out the difference
Hide even more logic to the backend