Audacity  2.2.0
FileNames Class Reference

Provides Static functions to yield filenames. More...

#include <FileNames.h>

Public Types

enum  Operation { Operation::_None, Operation::Open, Operation::Export }
 

Static Public Member Functions

static wxString MkDir (const wxString &Str)
 
static wxString TempDir ()
 
static void MakeNameUnique (wxArrayString &otherNames, wxFileName &newName)
 
static wxString LowerCaseAppNameInPath (const wxString &dirIn)
 
static wxString DataDir ()
 Audacity user data directory. More...
 
static wxString ResourcesDir ()
 
static wxString AutoSaveDir ()
 
static wxString HtmlHelpDir ()
 
static wxString HtmlHelpIndexFile (bool quick)
 
static wxString ChainDir ()
 
static wxString NRPDir ()
 
static wxString NRPFile ()
 
static wxString PluginRegistry ()
 
static wxString PluginSettings ()
 
static wxString BaseDir ()
 
static wxString ModulesDir ()
 
static wxString PlugInDir ()
 The user plug-in directory (not a system one) More...
 
static wxString ThemeDir ()
 
static wxString ThemeComponentsDir ()
 
static wxString ThemeCachePng ()
 
static wxString ThemeCacheAsCee ()
 
static wxString ThemeComponent (const wxString &Str)
 
static wxString ThemeCacheHtm ()
 
static wxString ThemeImageDefsAsCee ()
 
static wxString PathFromAddr (void *addr)
 
static wxFileNameWrapper DefaultToDocumentsFolder (const wxString &preference)
 
static wxString FindDefaultPath (Operation op)
 
static void UpdateDefaultPath (Operation op, const wxString &path)
 
template<typename F >
static wxString WithDefaultPath (Operation op, const wxString &defaultPath, F function)
 
static wxString SelectFile (Operation op, const wxString &message, const wxString &default_path, const wxString &default_filename, const wxString &default_extension, const wxString &wildcard, int flags, wxWindow *parent)
 

Private Member Functions

 FileNames ()
 
 ~FileNames ()
 

Detailed Description

Provides Static functions to yield filenames.

This class helps us with setting a base path, and makes it easier for us to keep track of the different kinds of files we read and write from.

JKC: In time I plan to add all file names and file extensions used throughout Audacity into this one place.

Member Enumeration Documentation

enum FileNames::Operation
strong
Enumerator
_None 
Open 
Export 

Constructor & Destructor Documentation

FileNames::FileNames ( )
inlineprivate
FileNames::~FileNames ( )
inlineprivate

Member Function Documentation

wxString FileNames::BaseDir ( )
static
wxFileNameWrapper FileNames::DefaultToDocumentsFolder ( const wxString &  preference)
static
static wxString FileNames::HtmlHelpIndexFile ( bool  quick)
static
wxString FileNames::LowerCaseAppNameInPath ( const wxString &  dirIn)
static
void FileNames::MakeNameUnique ( wxArrayString &  otherNames,
wxFileName &  newName 
)
static
wxString FileNames::MkDir ( const wxString &  Str)
static
wxString FileNames::ModulesDir ( )
static

References BaseDir().

Referenced by ModuleManager::DiscoverProviders().

wxString FileNames::NRPDir ( )
static

References DataDir(), and MkDir().

Referenced by NRPFile().

wxString FileNames::NRPFile ( )
static

References NRPDir().

wxString FileNames::PathFromAddr ( void *  addr)
static
wxString FileNames::PlugInDir ( )
static

The user plug-in directory (not a system one)

This returns the string path to where the user may have put plug-ins if they don't have system admin rights. Under default settings, it's <DataDir>/Plug-Ins/

References DataDir(), and MkDir().

Referenced by PluginManager::FindFilesInPathList(), and NyquistEffect::GetNyquistSearchPath().

wxString FileNames::PluginRegistry ( )
static

References DataDir().

Referenced by PluginManager::Load(), and PluginManager::Save().

wxString FileNames::PluginSettings ( )
static

References DataDir().

Referenced by PluginManager::GetSettings().

wxString FileNames::ResourcesDir ( )
static
wxString FileNames::TempDir ( )
static

Returns the directory used for temp files.

Todo:
put a counter in here to see if it gets used a lot. if it does, then maybe we should cache the path name each time.

References gPrefs, and MkDir().

Referenced by NyquistEffect::Process().

wxString FileNames::ThemeCacheAsCee ( )
static

References ThemeDir().

Referenced by ThemeBase::CreateImageCache().

wxString FileNames::ThemeCacheHtm ( )
static

References ThemeDir().

Referenced by ThemeBase::WriteImageMap().

wxString FileNames::ThemeCachePng ( )
static
wxString FileNames::ThemeComponent ( const wxString &  Str)
static
wxString FileNames::ThemeComponentsDir ( )
static
wxString FileNames::ThemeDir ( )
static
wxString FileNames::ThemeImageDefsAsCee ( )
static

References ThemeDir().

Referenced by ThemeBase::WriteImageDefs().

void FileNames::UpdateDefaultPath ( Operation  op,
const wxString &  path 
)
static
template<typename F >
static wxString FileNames::WithDefaultPath ( Operation  op,
const wxString &  defaultPath,
function 
)
inlinestatic

References FindDefaultPath(), and UpdateDefaultPath().

Referenced by SelectFile().


The documentation for this class was generated from the following files: