filesystem implementation in c