added filesystem utility function

Change-Id: I46b1be885d027406633ef442ad1716d1f295a326