-/*===================================================================*/
-/*============================ file.c ===============================*/
-/*===================================================================*/
-/* file handling */
-void fs_file_close (FILE *);
-int fs_file_error (FILE *);
-int fs_file_getc (FILE *);
-int fs_file_printf (FILE *, const char *, ...);
-int fs_file_puts (FILE *, const char *);
-int fs_file_seek (FILE *, long int, int);
-long int fs_file_tell (FILE *);
-
-size_t fs_file_read (void *, size_t, size_t, FILE *);
-size_t fs_file_write (const void *, size_t, size_t, FILE *);
-
-FILE *fs_file_open (const char *, const char *);
-int fs_file_getline(char **, size_t *, FILE *);
-
-/* directory handling */
+int util_snprintf(char *str, size_t, const char *fmt, ...);
+
+
+/* fs.c */
+#define FS_FILE_SEEK_SET 0
+#define FS_FILE_SEEK_CUR 1
+#define FS_FILE_SEEK_END 2
+#define FS_FILE_EOF -1
+
+typedef struct fs_dir_s fs_dir_t;
+/*typedef struct fs_file_s fs_file_t;*/
+typedef struct dirent fs_dirent_t;
+
+void fs_file_close (fs_file_t *);
+int fs_file_error (fs_file_t *);
+int fs_file_getc (fs_file_t *);
+int fs_file_printf (fs_file_t *, const char *, ...);
+int fs_file_puts (fs_file_t *, const char *);
+int fs_file_seek (fs_file_t *, long int, int);
+long fs_file_tell (fs_file_t *);
+int fs_file_flush (fs_file_t *);
+
+size_t fs_file_read (void *, size_t, size_t, fs_file_t *);
+size_t fs_file_write (const void *, size_t, size_t, fs_file_t *);
+
+fs_file_t *fs_file_open (const char *, const char *);
+int fs_file_getline(char **, size_t *, fs_file_t *);
+