full implementation of fs in leveldb