123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- #ifndef Datei_H
- #define Datei_H
- #include "Array.h"
- #include "Reader.h"
- #include "Writer.h"
- #include <fstream>
- namespace Framework
- {
- class Text;
- class Zeit;
- namespace Encryption
- {
- class Key;
- }
- class Datei;
-
- class Datei : public Reader, public Writer, public virtual ReferenceCounter
- {
- public:
- class Style
- {
- public:
- const static int lesen = 0x01;
- const static int schreiben = 0x02;
- const static int ende = 0x04;
- };
- private:
- std::fstream *stream;
- Text *pfad;
- __int64 gr;
- char tmpLByte;
- char tmpLBPos;
- char tmpSByte;
- char tmpSBPos;
- Encryption::Key *key;
- public:
-
- DLLEXPORT Datei();
-
- DLLEXPORT virtual ~Datei();
-
-
- DLLEXPORT void setDatei( const char *pfad );
-
-
- DLLEXPORT void setDatei( Text *pfad );
-
-
-
- DLLEXPORT bool umbenennen( const char *pfad );
-
-
-
- DLLEXPORT bool umbenennen( Text *pfad );
-
-
- DLLEXPORT bool remove();
-
-
- DLLEXPORT bool erstellen();
-
-
-
- DLLEXPORT bool open( int style );
-
-
-
- DLLEXPORT void setLPosition( __int64 pos, bool ende ) override;
-
-
-
- DLLEXPORT void setSPosition( __int64 pos, bool ende ) override;
-
-
-
- DLLEXPORT void schreibe( const char *bytes, int len ) override;
-
-
-
- DLLEXPORT void lese( char *bytes, int len ) override;
-
-
- DLLEXPORT Text *leseZeile() override;
-
- DLLEXPORT void close();
-
- DLLEXPORT void setKey( char *s, int l );
- #ifdef WIN32
-
-
-
- DLLEXPORT bool setLetzteÄnderung( Zeit *zeit );
- #endif
-
-
-
- DLLEXPORT bool getNextBit( bool &bit );
-
-
-
- DLLEXPORT bool setNextBit( bool bit );
-
-
- DLLEXPORT bool istOrdner() const;
-
-
- DLLEXPORT bool istOffen() const;
-
-
- DLLEXPORT int getUnterdateiAnzahl() const;
-
-
- DLLEXPORT RCArray< Text > *getDateiListe() const;
-
-
- DLLEXPORT __int64 getSize() const;
-
-
- DLLEXPORT Zeit *getLastChange() const;
-
-
- DLLEXPORT bool existiert() const;
-
-
- DLLEXPORT __int64 getLPosition() const override;
-
-
- DLLEXPORT __int64 getSPosition() const override;
-
-
- DLLEXPORT bool istEnde() const override;
-
- DLLEXPORT Text *getPfad() const;
-
- DLLEXPORT Text *zPfad() const;
- };
-
-
-
-
- DLLEXPORT void GetFreePfad( Text *zPfad );
-
-
-
- DLLEXPORT bool DateiPfadErstellen( Text* pfad );
-
-
-
- DLLEXPORT bool DateiRemove( Text *pfad );
-
-
-
-
- DLLEXPORT bool DateiUmbenennen( Text *pfad_alt, Text *pfad_neu );
-
-
-
- DLLEXPORT bool DateiExistiert( Text *pfad );
-
-
-
- DLLEXPORT bool DateiIstVerzeichnis( Text *pfad );
-
-
-
- DLLEXPORT bool DateiPfadErstellen( const char *pfad );
-
-
-
- DLLEXPORT bool DateiRemove( const char *pfad );
-
-
-
-
- DLLEXPORT bool DateiUmbenennen( const char *pfad_alt, const char *pfad_neu );
-
-
-
- DLLEXPORT bool DateiExistiert( const char *pfad );
-
-
-
- DLLEXPORT bool DateiIstVerzeichnis( const char *pfad );
- }
- #endif
|