Aggiunto metodo exist

git-svn-id: svn://10.65.10.50/trunk@581 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-11-10 11:22:47 +00:00
parent 25b7f954ea
commit 4bd1136081
2 changed files with 14 additions and 0 deletions

View File

@ -171,6 +171,19 @@ void TPrefix::set(const char* name, bool force, TFilelock mode)
}
}
bool TPrefix::exist(long codditta) const
{
CHECKD(codditta > 0, "Solo le ditte con codice maggiore di zero possono esistere : codice", codditta);
TFilename s(firm2dir(codditta)); s << "/dir.gen";
if (fexist(s))
{
s = s.path();
s << "/trc.gen";
return fexist(s);
}
return FALSE;
}
bool TPrefix::test(const char* s) const
{

View File

@ -33,6 +33,7 @@ class TPrefix : public TObject
public:
// @FPUB
void set(const char* name = NULL, bool force = FALSE, TFilelock mode = _manulock);
bool exist(long codditta) const;
bool test(long codditta) const;
long get_codditta() const ;
bool set_codditta(long codditta, bool force = FALSE);