#include <lldir.h>
Inheritance diagram for LLDir:
Public Member Functions | |
LLDir () | |
virtual | ~LLDir () |
virtual void | initAppDirs (const std::string &app_name)=0 |
virtual S32 | deleteFilesInDir (const std::string &dirname, const std::string &mask) |
virtual U32 | countFilesInDir (const std::string &dirname, const std::string &mask)=0 |
virtual BOOL | getNextFileInDir (const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap)=0 |
virtual void | getRandomFileInDir (const std::string &dirname, const std::string &mask, std::string &fname)=0 |
virtual std::string | getCurPath ()=0 |
virtual BOOL | fileExists (const std::string &filename)=0 |
const std::string | findFile (const std::string &filename, const std::string searchPath1="", const std::string searchPath2="", const std::string searchPath3="") |
const std::string & | getExecutablePathAndName () const |
const std::string & | getAppName () const |
const std::string & | getExecutableDir () const |
const std::string & | getExecutableFilename () const |
const std::string & | getWorkingDir () const |
const std::string & | getAppRODataDir () const |
const std::string & | getOSUserDir () const |
const std::string & | getOSUserAppDir () const |
const std::string & | getLindenUserDir () const |
const std::string & | getChatLogsDir () const |
const std::string & | getPerAccountChatLogsDir () const |
const std::string & | getTempDir () const |
const std::string | getCacheDir (bool get_default=false) const |
const std::string & | getCAFile () const |
const std::string & | getDirDelimiter () const |
const std::string & | getSkinDir () const |
std::string | getExpandedFilename (ELLPath location, const std::string &filename) const |
std::string | getExpandedFilename (ELLPath location, const std::string &subdir, const std::string &filename) const |
std::string | getTempFilename () const |
virtual void | setChatLogsDir (const std::string &path) |
virtual void | setPerAccountChatLogsDir (const std::string &first, const std::string &last) |
virtual void | setLindenUserDir (const std::string &first, const std::string &last) |
virtual void | setSkinFolder (const std::string &skin_folder) |
virtual bool | setCacheDir (const std::string &path) |
virtual void | dumpCurrentDirectories () |
Protected Attributes | |
std::string | mAppName |
std::string | mExecutablePathAndName |
std::string | mExecutableFilename |
std::string | mExecutableDir |
std::string | mWorkingDir |
std::string | mAppRODataDir |
std::string | mOSUserDir |
std::string | mOSUserAppDir |
std::string | mLindenUserDir |
std::string | mPerAccountChatLogsDir |
std::string | mChatLogsDir |
std::string | mCAFile |
std::string | mTempDir |
std::string | mCacheDir |
std::string | mDirDelimiter |
std::string | mSkinDir |
Definition at line 56 of file lldir.h.
virtual U32 LLDir::countFilesInDir | ( | const std::string & | dirname, | |
const std::string & | mask | |||
) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
S32 LLDir::deleteFilesInDir | ( | const std::string & | dirname, | |
const std::string & | mask | |||
) | [virtual] |
Reimplemented in LLDir_Mac.
Definition at line 82 of file lldir.cpp.
References count, FALSE, getDirDelimiter(), getNextFileInDir(), llendl, llwarns, ms_sleep(), LLFile::remove(), and S32.
Referenced by cleanup_app(), init_cache(), LLVOVolume::processUpdateMessage(), purge_cache(), LLTextureCache::purgeAllTextures(), remove_cache_files(), and updatethreadproc().
void LLDir::dumpCurrentDirectories | ( | ) | [virtual] |
Definition at line 485 of file lldir.cpp.
References getAppName(), getAppRODataDir(), getCAFile(), getCurPath(), getExecutableDir(), getExecutableFilename(), getExecutablePathAndName(), getLindenUserDir(), getOSUserAppDir(), getOSUserDir(), getSkinDir(), getTempDir(), getWorkingDir(), llendl, and llinfos.
Referenced by setLindenUserDir().
virtual BOOL LLDir::fileExists | ( | const std::string & | filename | ) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
Referenced by findFile(), LLAudioEngine::hasDecodedFile(), and LLUI::locateSkin().
const std::string LLDir::findFile | ( | const std::string & | filename, | |
const std::string | searchPath1 = "" , |
|||
const std::string | searchPath2 = "" , |
|||
const std::string | searchPath3 = "" | |||
) |
Definition at line 125 of file lldir.cpp.
References fileExists(), and getDirDelimiter().
Referenced by LLImageJ2C::openDSO().
const std::string & LLDir::getAppName | ( | ) | const |
Definition at line 173 of file lldir.cpp.
References mAppName.
Referenced by dumpCurrentDirectories().
const std::string & LLDir::getAppRODataDir | ( | ) | const |
Definition at line 178 of file lldir.cpp.
References mAppRODataDir.
Referenced by dumpCurrentDirectories(), getExpandedFilename(), LLViewerWindow::initFonts(), load_url_local_file(), LLFeatureManager::loadFeatureTables(), LLFeatureManager::loadGPUClass(), main(), LLImageJ2C::openDSO(), setSkinFolder(), LLUICtrlFactory::setupPaths(), LLVoiceClient::stateMachine(), update_dialog_callback(), and viewer_crash_callback().
const std::string LLDir::getCacheDir | ( | bool | get_default = false |
) | const |
Definition at line 213 of file lldir.cpp.
References getOSUserAppDir(), mCacheDir, and mDirDelimiter.
Referenced by getExpandedFilename(), LLPanelNetwork::onClickResetCache(), and LLPanelNetwork::onClickSetCache().
const std::string & LLDir::getCAFile | ( | ) | const |
Definition at line 234 of file lldir.cpp.
References mCAFile.
Referenced by dumpCurrentDirectories(), LLXMLRPCTransaction::Impl::init(), and main_loop().
const std::string & LLDir::getChatLogsDir | ( | ) | const |
Definition at line 198 of file lldir.cpp.
References mChatLogsDir.
Referenced by getExpandedFilename(), idle_startup(), and setPerAccountChatLogsDir().
virtual std::string LLDir::getCurPath | ( | ) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
Referenced by dumpCurrentDirectories(), and viewer_crash_callback().
const std::string & LLDir::getDirDelimiter | ( | ) | const |
Definition at line 239 of file lldir.cpp.
References mDirDelimiter.
Referenced by cleanup_app(), deleteFilesInDir(), exported_j2c_complete(), findFile(), LLTextureCache::getTextureFileName(), idle_startup(), init_cache(), init_start_screen(), LLTextureCache::initCache(), LLTransferSourceFile::initTransfer(), LLFloaterImport::LLFloaterImport(), LLFloaterNameDesc::LLFloaterNameDesc(), LLPanelLogin::LLPanelLogin(), load_url_local_file(), LLViewerRegion::loadCache(), LLFeatureManager::loadFeatureTables(), LLFeatureManager::loadGPUClass(), LLUI::locateSkin(), main(), LLFloaterImport::onBtnOK(), LLFloaterImport::postBuild(), process_alert_core(), LLVOVolume::processUpdateMessage(), purge_cache(), LLTextureCache::purgeAllTextures(), remove_cache_files(), render_disconnected_background(), save_final_snapshot(), LLViewerRegion::saveCache(), LLViewerWindow::saveImageNumbered(), LLViewerWindow::saveMovieNumbered(), LLTextureCache::setDirNames(), LLUICtrlFactory::setupPaths(), LLVoiceClient::stateMachine(), update_dialog_callback(), updatethreadproc(), upload_new_resource(), upload_pick(), and viewer_crash_callback().
const std::string & LLDir::getExecutableDir | ( | ) | const |
Definition at line 163 of file lldir.cpp.
References mExecutableDir.
Referenced by dumpCurrentDirectories(), idle_startup(), and LLImageJ2C::openDSO().
const std::string & LLDir::getExecutableFilename | ( | ) | const |
Definition at line 158 of file lldir.cpp.
References mExecutableFilename.
Referenced by dumpCurrentDirectories().
const std::string & LLDir::getExecutablePathAndName | ( | ) | const |
Definition at line 153 of file lldir.cpp.
References mExecutablePathAndName.
Referenced by dumpCurrentDirectories(), main(), and viewer_crash_callback().
std::string LLDir::getExpandedFilename | ( | ELLPath | location, | |
const std::string & | subdir, | |||
const std::string & | filename | |||
) | const |
Definition at line 254 of file lldir.cpp.
References getAppRODataDir(), getCacheDir(), getChatLogsDir(), getLindenUserDir(), getOSUserAppDir(), getPerAccountChatLogsDir(), getSkinDir(), getTempDir(), LL_PATH_APP_SETTINGS, LL_PATH_CACHE, LL_PATH_CHARACTER, LL_PATH_CHAT_LOGS, LL_PATH_HELP, LL_PATH_LOGS, LL_PATH_MOTIONS, LL_PATH_MOZILLA_PROFILE, LL_PATH_NONE, LL_PATH_PER_ACCOUNT_CHAT_LOGS, LL_PATH_PER_SL_ACCOUNT, LL_PATH_SKINS, LL_PATH_TEMP, LL_PATH_TOP_SKIN, LL_PATH_USER_SETTINGS, llassert, and mDirDelimiter.
std::string LLDir::getExpandedFilename | ( | ELLPath | location, | |
const std::string & | filename | |||
) | const |
Definition at line 249 of file lldir.cpp.
Referenced by another_instance_running(), LLMuteList::cache(), LLInventoryModel::cache(), cleanup_app(), LLFloaterCompileQueue::compile(), LLVoiceClient::connectorCreate(), LLViewerImageList::doPrefetchImages(), LLFrameStats::dump(), LLVOAvatar::dumpArchetypeXML(), LLTexStaticImageList::getImageTGA(), LLTextureCache::getLocalFileName(), LLPolyMesh::getMesh(), handle_reload_settings(), LLAudioEngine::hasDecodedFile(), idle_startup(), LLInventoryView::init(), init_cache(), init_logging(), init_marker_file(), LLDir_Solaris::initAppDirs(), LLDir_Linux::initAppDirs(), LLVOTree::initClass(), LLVOGrass::initClass(), LLVOAvatar::initClass(), LLAssetStorage::legacyGetDataCallback(), LLPanelLogin::LLPanelLogin(), LLUrlWhiteList::load(), LLGenePool::load(), LLAudioData::load(), load_crash_behavior_setting(), load_name_cache(), load_password_from_disk(), load_region_name_cache(), loadAttentions(), LLViewerRegion::loadCache(), LLTexStaticImageList::loadImageRaw(), LLKeyframeMotionParam::loadMotions(), LLShaderMgr::loadShader(), LLInventoryModel::loadSkeleton(), LLViewerObject::loadTaskInvFile(), LLBVHLoader::loadTranslationTable(), LLUI::locateSkin(), login_alert_status(), main(), LLFloaterPreference::onBtnOK(), LLLiveLSLEditor::onSaveBytecodeComplete(), LLPreviewNotecard::onSaveComplete(), LLWearable::onSaveNewAssetComplete(), LLPanelNetwork::postBuild(), LLXferManager::processFileRequest(), LLMuteList::processMuteListUpdate(), LLAudioDecodeMgr::Impl::processQueue(), LLViewerObject::processTaskInv(), LLVOVolume::processUpdateMessage(), LLMuteList::processUseCachedMuteList(), purge_cache(), reload_personal_settings_overrides(), remove_cache_files(), remove_marker_file(), LLMuteList::requestFromServer(), LLStandardBumpmap::restoreGL(), LLUrlWhiteList::save(), save_crash_behavior_setting(), save_name_cache(), save_password_to_disk(), save_region_name_cache(), LLViewerRegion::saveCache(), LLLiveLSLEditor::saveIfNeeded(), LLPreviewLSL::saveIfNeeded(), LLWearable::saveNewAsset(), LLFloaterCompileQueue::scriptArrived(), send_crash_report(), LLTextureCache::setDirNames(), LLUICtrlFactory::setupPaths(), LLViewerImageList::shutdown(), updatethreadproc(), LLLiveLSLEditor::uploadAssetLegacy(), LLPreviewLSL::uploadAssetLegacy(), viewer_crash_callback(), write_debug(), and LLInventoryView::~LLInventoryView().
const std::string & LLDir::getLindenUserDir | ( | ) | const |
Definition at line 193 of file lldir.cpp.
References mLindenUserDir.
Referenced by dumpCurrentDirectories(), getExpandedFilename(), idle_startup(), init_start_screen(), process_alert_core(), render_disconnected_background(), and save_final_snapshot().
virtual BOOL LLDir::getNextFileInDir | ( | const std::string & | dirname, | |
const std::string & | mask, | |||
std::string & | fname, | |||
BOOL | wrap | |||
) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
Referenced by deleteFilesInDir(), and init_cache().
const std::string & LLDir::getOSUserAppDir | ( | ) | const |
Definition at line 188 of file lldir.cpp.
References mOSUserAppDir.
Referenced by dumpCurrentDirectories(), getCacheDir(), getExpandedFilename(), idle_startup(), and setLindenUserDir().
const std::string & LLDir::getOSUserDir | ( | ) | const |
Definition at line 183 of file lldir.cpp.
References mOSUserDir.
Referenced by dumpCurrentDirectories().
const std::string & LLDir::getPerAccountChatLogsDir | ( | ) | const |
Definition at line 203 of file lldir.cpp.
References mPerAccountChatLogsDir.
Referenced by LLPrefsIMImpl::apply(), getExpandedFilename(), and idle_startup().
virtual void LLDir::getRandomFileInDir | ( | const std::string & | dirname, | |
const std::string & | mask, | |||
std::string & | fname | |||
) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
const std::string & LLDir::getSkinDir | ( | ) | const |
Definition at line 244 of file lldir.cpp.
References mSkinDir.
Referenced by dumpCurrentDirectories(), getExpandedFilename(), and main().
const std::string & LLDir::getTempDir | ( | ) | const |
Definition at line 208 of file lldir.cpp.
References mTempDir.
Referenced by dumpCurrentDirectories(), getExpandedFilename(), and getTempFilename().
std::string LLDir::getTempFilename | ( | ) | const |
Definition at line 376 of file lldir.cpp.
References LLUUID::generate(), getTempDir(), mDirDelimiter, and LLUUID::toString().
Referenced by LLXfer_File::initializeRequest(), update_dialog_callback(), and upload_new_resource().
const std::string & LLDir::getWorkingDir | ( | ) | const |
Definition at line 168 of file lldir.cpp.
References mWorkingDir.
Referenced by dumpCurrentDirectories(), LLScriptEdCore::onHelpComboCommit(), and LLScriptEdCore::setHelpPage().
virtual void LLDir::initAppDirs | ( | const std::string & | app_name | ) | [pure virtual] |
Implemented in LLDir_Linux, LLDir_Mac, LLDir_Solaris, and LLDir_Win32.
bool LLDir::setCacheDir | ( | const std::string & | path | ) | [virtual] |
Definition at line 461 of file lldir.cpp.
References LLFile::fopen(), mCacheDir, mDirDelimiter, LLFile::mkdir(), and LLFile::remove().
Referenced by init_cache().
void LLDir::setChatLogsDir | ( | const std::string & | path | ) | [virtual] |
Definition at line 417 of file lldir.cpp.
References llendl, llwarns, and mChatLogsDir.
Referenced by LLPrefsIMImpl::apply(), and idle_startup().
void LLDir::setLindenUserDir | ( | const std::string & | first, | |
const std::string & | last | |||
) | [virtual] |
Definition at line 392 of file lldir.cpp.
References dumpCurrentDirectories(), getOSUserAppDir(), llendl, llerrs, mDirDelimiter, mLindenUserDir, and LLStringBase< char >::toLower().
Referenced by idle_startup().
void LLDir::setPerAccountChatLogsDir | ( | const std::string & | first, | |
const std::string & | last | |||
) | [virtual] |
Definition at line 429 of file lldir.cpp.
References getChatLogsDir(), llendl, llwarns, mDirDelimiter, mPerAccountChatLogsDir, and LLStringBase< char >::toLower().
Referenced by LLPrefsIMImpl::apply(), and idle_startup().
void LLDir::setSkinFolder | ( | const std::string & | skin_folder | ) | [virtual] |
Definition at line 452 of file lldir.cpp.
References getAppRODataDir(), mDirDelimiter, and mSkinDir.
std::string LLDir::mAppName [protected] |
Definition at line 107 of file lldir.h.
Referenced by getAppName(), LLDir_Solaris::initAppDirs(), and LLDir_Linux::initAppDirs().
std::string LLDir::mAppRODataDir [protected] |
Definition at line 112 of file lldir.h.
Referenced by getAppRODataDir(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mCacheDir [protected] |
std::string LLDir::mCAFile [protected] |
Definition at line 118 of file lldir.h.
Referenced by getCAFile(), LLDir_Solaris::initAppDirs(), and LLDir_Linux::initAppDirs().
std::string LLDir::mChatLogsDir [protected] |
std::string LLDir::mDirDelimiter [protected] |
Definition at line 121 of file lldir.h.
Referenced by getCacheDir(), getDirDelimiter(), getExpandedFilename(), getTempFilename(), LLDir_Linux::LLDir_Linux(), LLDir_Solaris::LLDir_Solaris(), setCacheDir(), setLindenUserDir(), setPerAccountChatLogsDir(), and setSkinFolder().
std::string LLDir::mExecutableDir [protected] |
Definition at line 110 of file lldir.h.
Referenced by getExecutableDir(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mExecutableFilename [protected] |
Definition at line 109 of file lldir.h.
Referenced by getExecutableFilename(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mExecutablePathAndName [protected] |
Definition at line 108 of file lldir.h.
Referenced by getExecutablePathAndName(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mLindenUserDir [protected] |
Definition at line 115 of file lldir.h.
Referenced by getLindenUserDir(), LLDir_Linux::LLDir_Linux(), LLDir_Solaris::LLDir_Solaris(), and setLindenUserDir().
std::string LLDir::mOSUserAppDir [protected] |
Definition at line 114 of file lldir.h.
Referenced by getOSUserAppDir(), LLDir_Solaris::initAppDirs(), LLDir_Linux::initAppDirs(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mOSUserDir [protected] |
Definition at line 113 of file lldir.h.
Referenced by getOSUserDir(), LLDir_Solaris::initAppDirs(), LLDir_Linux::initAppDirs(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mPerAccountChatLogsDir [protected] |
Definition at line 116 of file lldir.h.
Referenced by getPerAccountChatLogsDir(), and setPerAccountChatLogsDir().
std::string LLDir::mSkinDir [protected] |
std::string LLDir::mTempDir [protected] |
Definition at line 119 of file lldir.h.
Referenced by getTempDir(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().
std::string LLDir::mWorkingDir [protected] |
Definition at line 111 of file lldir.h.
Referenced by getWorkingDir(), LLDir_Linux::LLDir_Linux(), and LLDir_Solaris::LLDir_Solaris().