void K3bTempDirSelectionWidget::fixTempPath( bool forceNewImageName ) { // if in file selection mode and no image file is specified or // forceNewImageName is true set the default image file name if ( selectionMode() == FILE ) { if ( forceNewImageName || QFileInfo( plainTempPath() ).isDir() ) { setTempPath( tempDirectory() + m_defaultImageFileName ); } } }
void BlastSearch::emptyTempDirectory() { //Safety checks if (g_blastSearch->m_tempDirectory == "") return; if (!g_blastSearch->m_tempDirectory.contains("bandage_temp")) return; QDir tempDirectory(m_tempDirectory); tempDirectory.setNameFilters(QStringList() << "*.*"); tempDirectory.setFilter(QDir::Files); foreach(QString dirFile, tempDirectory.entryList()) tempDirectory.remove(dirFile); }
/** * Creates temporary directory. * * @return returns the created temporary directory. * @throws IOException throws exception if the directory creation failed. * @see createDirectory(const std::string& path) */ std::string digidoc::util::File::createTempDirectory() throw(IOException) { std::string directory = tempDirectory(); createDirectory(directory); return directory; }
void K3bTempDirSelectionWidget::saveConfig() { KConfigGroup grp( k3bcore->config(), "General Options" ); grp.writePathEntry( "Temp Dir", tempDirectory() ); }
TITANIUM_PROPERTY_GETTER(FilesystemModule, tempDirectory) { return get_context().CreateString(tempDirectory()); }
TITANIUM_FUNCTION(FilesystemModule, getTempDirectory) { const auto js_context = this_object.get_context(); const auto filesystem_ptr = GetStaticObject(js_context).GetPrivate<FilesystemModule>(); return this_object.get_context().CreateString(filesystem_ptr->tempDirectory()); }