Listing 4 The File class

    class FileName;
                 // String containing legal filenames
    class Internal_ByteArray;
                 // Array of bytes (can include nuls)
                 // Includes length
    class Internal_ByteOffset; // a long
    class Internal_ByteSize;     // a long

    class Internal_File
        {
    public:
        enum Mode {Read, Write, ReadWrite};
        enum Error {No_error, Does_not_exist, Read_only,
            End_of_file, ... }
        Internal_File();
        ~Internal_File(); // calls close() if not closed
        Error open(FileName name, Mode mode = Read);
        Error create(FileName name);
        Error close();
        Internal_ByteSize read(Internal_ByteArray buffer);
        Internal_ByteSize write(Internal_ByteArray buffer);
        Error seek(Internal_ByteOffset offset);
        Error error();
        //...
        };

// End of File