MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / drop_files

Function drop_files

src/jrd/jrd.cpp:6820–6848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6818
6819
6820static bool drop_files(const jrd_file* file)
6821{
6822/**************************************
6823 *
6824 * d r o p _ f i l e s
6825 *
6826 **************************************
6827 *
6828 * Functional description
6829 * drop a linked list of files
6830 *
6831 **************************************/
6832 FbLocalStatus status;
6833
6834 for (; file; file = file->fil_next)
6835 {
6836 if (unlink(file->fil_string))
6837 {
6838 ERR_build_status(&status, Arg::Gds(isc_io_error) << Arg::Str("unlink") <<
6839 Arg::Str(file->fil_string) <<
6840 Arg::Gds(isc_io_delete_err) << SYS_ERR(errno));
6841 Database* dbb = GET_DBB();
6842 PageSpace* pageSpace = dbb->dbb_page_manager.findPageSpace(DB_PAGE_SPACE);
6843 iscDbLogStatus(pageSpace->file->fil_string, &status);
6844 }
6845 }
6846
6847 return status->getState() & IStatus::STATE_ERRORS ? true : false;
6848}
6849
6850
6851static void find_intl_charset(thread_db* tdbb, Jrd::Attachment* attachment, const DatabaseOptions* options)

Callers 1

internalDropDatabaseMethod · 0.85

Calls 8

ERR_build_statusFunction · 0.85
GdsClass · 0.85
StrClass · 0.85
GET_DBBFunction · 0.85
iscDbLogStatusFunction · 0.85
findPageSpaceMethod · 0.80
unlinkFunction · 0.50
getStateMethod · 0.45

Tested by

no test coverage detected