These .fnnnnn files appear to be created in the same directory as the input and any temp files that I create.
I create temporary files with names like DSSxxxxx.tmp and a few others. I also create output tiff or fits files.
Show MOST code where I create files:
FrameList& FrameList::saveListToFile(fs::path file)
{
if (std::FILE* hFile =
#if defined(Q_OS_WIN)
_wfopen(file.c_str(), L"wt")
#else
std::fopen(file.c_str(), "wt")
#endif
)
{
// Save the bitmap to the temporary file
bool CMultiBitmap::AddBitmap(CMemoryBitmap* pBitmap, DSS::OldProgressBase* pProgress)
{
static std::mutex initMutex{};
ZFUNCTRACE_RUNTIME();
if (m_bInitDone.load() == false)
{
auto lock = std::scoped_lock{ initMutex };
if (m_bInitDone.load() == false)
{
m_lWidth = pBitmap->RealWidth();
m_lHeight = pBitmap->RealHeight();
InitParts(); // Will set m_bInitDone to true
m_lNrAddedBitmaps = 0;
}
}
// Save the bitmap to the file
const size_t lScanLineSize = static_cast<size_t>(pBitmap->BitPerSample()) * (pBitmap->IsMonochrome() ? 1 : 3) * m_lWidth / 8;
std::vector<std::uint8_t> scanLineBuffer(lScanLineSize);
if (pProgress)
pProgress->Start2(m_lHeight);
for (const auto& partFile : m_vFiles)
{
auto dtor = [](FILE* fp) { if (fp != nullptr) fclose(fp); };
std::unique_ptr<FILE, decltype(dtor)> pFile{
#if defined(Q_OS_WIN)
_wfopen(partFile.file.c_str(), L"a+b"),
#else
std::fopen(partFile.file.c_str(), "a+b"),
#endif
dtor };
if (pFile.get() == nullptr)
return false;
fseek(pFile.get(), 0, SEEK_END);
for (int j = partFile.m_lStartRow; j <= partFile.m_lEndRow; j++)
{
pBitmap->GetScanLine(j, scanLineBuffer.data());
if (fwrite(scanLineBuffer.data(), lScanLineSize, 1, pFile.get()) != 1)
return false;
if (pProgress)
pProgress->Progress2(j + 1);
}
}
if (pProgress)
pProgress->End2();
m_lNrAddedBitmaps++;
return true;
}
bool CTIFFWriter::Open()
{
ZFUNCTRACE_RUNTIME();
bool bResult = false;
constexpr unsigned char exifVersion[4] {'0', '2', '3', '1' }; // EXIF 2.31 version is 4 characters of a string!
toff_t dir_offset_EXIF{ 0 };
#ifdef Q_OS_WIN
m_tiff = TIFFOpenW(file.wstring().c_str(), "w");
#else
m_tiff = TIFFOpen(reinterpret_cast<const char*>(file.u8string().c_str()), "w");
#endif
bool CFITSWriter::Open()
{
ZFUNCTRACE_RUNTIME();
bool bResult = false;
Workspace workspace;
char error_text[31] = ""; // Error text for FITS errors.
bool compressFITSFile{ workspace.value("Stacking/CompressFITS", false).toBool() };
// Create a new fits file
int status = 0;
fs::remove(file);
fits_create_diskfile(&m_fits, reinterpret_cast<const char*>(file.generic_u8string().c_str()), &status);
There's a few others that create temporary .txt files but I don't think they are relevant.