| 1 | /* |
| 2 | * Copyright (C) 2006 Steve Ratcliffe |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * |
| 14 | * Author: Steve Ratcliffe |
| 15 | * Create date: 02-Dec-2006 |
| 16 | */ |
| 17 | package uk.me.parabola.imgfmt.fs; |
| 18 | |
| 19 | /** |
| 20 | * Interface used for directory entries used to represent <i>files</i>. |
| 21 | * A directory entry has the file name, its extension (its a 8+3 filename) |
| 22 | * and the size of the file. |
| 23 | * |
| 24 | * @author Steve Ratcliffe |
| 25 | */ |
| 26 | public interface DirectoryEntry { |
| 27 | public static final int ENTRY_SIZE = 512; |
| 28 | public static final int SLOTS_PER_ENTRY = 240; |
| 29 | |
| 30 | /** |
| 31 | * Get the file name. |
| 32 | * @return The file name. |
| 33 | */ |
| 34 | public String getName(); |
| 35 | |
| 36 | /** |
| 37 | * Get the file extension. |
| 38 | * @return The file extension. |
| 39 | */ |
| 40 | public String getExt(); |
| 41 | |
| 42 | /** |
| 43 | * Get the full name. That is name + extension. |
| 44 | * |
| 45 | * @return The full name as NAME.EXT |
| 46 | */ |
| 47 | public String getFullName(); |
| 48 | |
| 49 | /** |
| 50 | * Get the file size. |
| 51 | * @return The size of the file in bytes. |
| 52 | */ |
| 53 | public int getSize(); |
| 54 | |
| 55 | /** |
| 56 | * If this is a special 'hidden' file. True for the all-spaces 'file'. |
| 57 | * |
| 58 | * @return True if this is not a regular file. |
| 59 | */ |
| 60 | public boolean isSpecial(); |
| 61 | } |