Ejemplo n.º 1
0
void saveAsFile(const char * filepath, const char *filename, const char *text, const char *ext)
{
    StringBuffer path(filepath);

    appendFileName(path, filename);
    if(ext && *ext)
        path.append(ext);

    Owned<IFile> file = createIFile(path.str());
    Owned<IFileIO> io = file->open(IFOcreaterw);

    DBGLOG("Writing to file %s", file->queryFilename());

    if (io.get())
        io->write(0, strlen(text), text);
    else
        DBGLOG("File %s can't be created", file->queryFilename());
}
Ejemplo n.º 2
0
boost::filesystem::path getInterimTempFile(const boost::filesystem::path& file) {
    return appendFileName(file, kFTDCInterimTempFile);
}