Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 1 | with Interfaces; |
| 2 | |
| 3 | with FS.FILO.Dev; |
| 4 | |
| 5 | package body FS.FILO.Ext2 is |
| 6 | |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 7 | function Is_Mounted (State : T) return Boolean is (State.S >= Mounted); |
| 8 | function Is_Open (State : T) return Boolean is (State.S = File_Opened); |
| 9 | |
| 10 | procedure Mount |
| 11 | (State : in out T; |
| 12 | Part_Len : in Partition_Length; |
| 13 | Success : out Boolean) |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 14 | is |
| 15 | begin |
| 16 | Success := False; |
| 17 | end Mount; |
| 18 | |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 19 | procedure Open |
| 20 | (State : in out T; |
| 21 | File_Len : out File_Length; |
| 22 | File_Path : in String; |
| 23 | Success : out Boolean) |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 24 | is |
| 25 | begin |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 26 | File_Len := 0; |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 27 | Success := False; |
| 28 | end Open; |
| 29 | |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 30 | procedure Close (State : in out T) is |
| 31 | begin |
| 32 | State.S := Mounted; |
| 33 | end Close; |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 34 | |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 35 | procedure Read |
| 36 | (State : in out T; |
| 37 | File_Len : in File_Length; |
| 38 | File_Pos : in out File_Offset; |
| 39 | Buf : out Buffer_Type; |
| 40 | Len : out Natural) |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 41 | is |
| 42 | begin |
Nico Huber | 57d3a85 | 2023-12-04 15:42:40 +0100 | [diff] [blame^] | 43 | Buf := (others => 0); |
Nico Huber | 1d7727f | 2023-11-30 15:58:46 +0100 | [diff] [blame] | 44 | Len := 0; |
| 45 | end Read; |
| 46 | |
| 47 | end FS.FILO.Ext2; |