writefs: finished general functions.