Move fs-filo to filo-fs
Signed-off-by: Thomas Heijligen <src@posteo.de>
diff --git a/src/filo-fs-vfs.ads b/src/filo-fs-vfs.ads
new file mode 100644
index 0000000..500c77b
--- /dev/null
+++ b/src/filo-fs-vfs.ads
@@ -0,0 +1,66 @@
+with System;
+with Interfaces.C;
+with Interfaces.C.Strings;
+
+use Interfaces.C;
+
+generic
+
+ type T (<>) is private;
+
+ with function Is_Mounted (State : T) return Boolean is <>;
+ with function Is_Open (State : T) return Boolean is <>
+ with
+ Post => (if Is_Open'Result then Is_Mounted (State));
+
+ Initial : T;
+
+ with procedure Mount
+ (State : in out T;
+ Part_Len : in Partition_Length;
+ Success : out Boolean)
+ is <>
+ with
+ Pre => not Is_Mounted (State),
+ Post => Success = Is_Mounted (State);
+
+ with procedure Open
+ (State : in out T;
+ File_Len : out File_Length;
+ File_Path : in String;
+ Success : out Boolean)
+ is <>
+ with
+ Pre => Is_Mounted (State) and not Is_Open (State),
+ Post => Success = Is_Open (State);
+
+ with procedure Close (State : in out T)
+ is <>
+ with
+ Pre => Is_Open (State),
+ Post => Is_Mounted (State);
+
+ with procedure Read
+ (State : in out T;
+ File_Len : in File_Length;
+ File_Pos : in out File_Offset;
+ Buf : out Buffer_Type;
+ Len : out Natural)
+ is <>
+ with
+ Pre => Is_Open (State),
+ Post => Is_Open (State);
+
+package FILO.FS.VFS
+with
+ Convention => C
+is
+
+ function C_Mount return int;
+
+ function C_Open (File_Path : Strings.chars_ptr) return int;
+ procedure C_Close;
+
+ function C_Read (Buf : System.Address; Len : int) return int;
+
+end FILO.FS.VFS;