|
|
@ -69,7 +69,7 @@ namespace FileNames |
|
|
|
}; |
|
|
|
|
|
|
|
// Frequently used types |
|
|
|
extern AUDACITY_DLL_API const FileType |
|
|
|
extern TENACITY_DLL_API const FileType |
|
|
|
AllFiles // * |
|
|
|
, AudacityProjects // *.aup3 |
|
|
|
, DynamicLibraries // depends on the operating system |
|
|
@ -80,21 +80,21 @@ namespace FileNames |
|
|
|
|
|
|
|
// Convert fileTypes into a single string as expected by wxWidgets file |
|
|
|
// selection dialog |
|
|
|
AUDACITY_DLL_API wxString FormatWildcard( const FileTypes &fileTypes ); |
|
|
|
TENACITY_DLL_API wxString FormatWildcard( const FileTypes &fileTypes ); |
|
|
|
|
|
|
|
// This exists to compensate for bugs in wxCopyFile: |
|
|
|
AUDACITY_DLL_API bool DoCopyFile( |
|
|
|
TENACITY_DLL_API bool DoCopyFile( |
|
|
|
const FilePath& file1, const FilePath& file2, bool overwrite = true); |
|
|
|
|
|
|
|
// wxWidgets doesn't have a function to do this: make a hard file-system |
|
|
|
// link if possible. It might not be, as when the paths are on different |
|
|
|
// storage devices. |
|
|
|
AUDACITY_DLL_API |
|
|
|
TENACITY_DLL_API |
|
|
|
bool HardLinkFile( const FilePath& file1, const FilePath& file2); |
|
|
|
|
|
|
|
AUDACITY_DLL_API wxString MkDir(const wxString &Str); |
|
|
|
TENACITY_DLL_API wxString MkDir(const wxString &Str); |
|
|
|
|
|
|
|
AUDACITY_DLL_API bool IsMidi(const FilePath &fName); |
|
|
|
TENACITY_DLL_API bool IsMidi(const FilePath &fName); |
|
|
|
|
|
|
|
/** \brief A list of directories that should be searched for Audacity files |
|
|
|
* (plug-ins, help files, etc.). |
|
|
@ -104,14 +104,14 @@ namespace FileNames |
|
|
|
* directories can be specified using the AUDACITY_PATH environment |
|
|
|
* variable. On Windows or Mac OS, this will include the directory |
|
|
|
* which contains the Audacity program. */ |
|
|
|
AUDACITY_DLL_API const FilePaths &AudacityPathList(); |
|
|
|
AUDACITY_DLL_API void SetAudacityPathList( FilePaths list ); |
|
|
|
TENACITY_DLL_API const FilePaths &AudacityPathList(); |
|
|
|
TENACITY_DLL_API void SetAudacityPathList( FilePaths list ); |
|
|
|
|
|
|
|
// originally an ExportMultipleDialog method. Append suffix if newName appears in otherNames. |
|
|
|
AUDACITY_DLL_API void MakeNameUnique( |
|
|
|
TENACITY_DLL_API void MakeNameUnique( |
|
|
|
FilePaths &otherNames, wxFileName &newName); |
|
|
|
|
|
|
|
AUDACITY_DLL_API wxString LowerCaseAppNameInPath( const wxString & dirIn); |
|
|
|
TENACITY_DLL_API wxString LowerCaseAppNameInPath( const wxString & dirIn); |
|
|
|
/** \brief Tenacity user config directory |
|
|
|
* |
|
|
|
* Where Tenacity keeps its settigns squirreled away, by default ~/.config/tenacity/ |
|
|
@ -122,39 +122,39 @@ namespace FileNames |
|
|
|
* Where Tenacity keeps its settings and other user data squirreled away, |
|
|
|
* by default ~/.local/share/tenacity/ on Unix, Application Data/Tenacity on |
|
|
|
* windows system */ |
|
|
|
AUDACITY_DLL_API FilePath DataDir(); |
|
|
|
AUDACITY_DLL_API FilePath ResourcesDir(); |
|
|
|
AUDACITY_DLL_API FilePath HtmlHelpDir(); |
|
|
|
AUDACITY_DLL_API FilePath HtmlHelpIndexFile(bool quick); |
|
|
|
AUDACITY_DLL_API FilePath LegacyChainDir(); |
|
|
|
AUDACITY_DLL_API FilePath MacroDir(); |
|
|
|
AUDACITY_DLL_API FilePath NRPDir(); |
|
|
|
AUDACITY_DLL_API FilePath NRPFile(); |
|
|
|
AUDACITY_DLL_API FilePath PluginRegistry(); |
|
|
|
AUDACITY_DLL_API FilePath PluginSettings(); |
|
|
|
|
|
|
|
AUDACITY_DLL_API FilePath BaseDir(); |
|
|
|
AUDACITY_DLL_API FilePath ModulesDir(); |
|
|
|
TENACITY_DLL_API FilePath DataDir(); |
|
|
|
TENACITY_DLL_API FilePath ResourcesDir(); |
|
|
|
TENACITY_DLL_API FilePath HtmlHelpDir(); |
|
|
|
TENACITY_DLL_API FilePath HtmlHelpIndexFile(bool quick); |
|
|
|
TENACITY_DLL_API FilePath LegacyChainDir(); |
|
|
|
TENACITY_DLL_API FilePath MacroDir(); |
|
|
|
TENACITY_DLL_API FilePath NRPDir(); |
|
|
|
TENACITY_DLL_API FilePath NRPFile(); |
|
|
|
TENACITY_DLL_API FilePath PluginRegistry(); |
|
|
|
TENACITY_DLL_API FilePath PluginSettings(); |
|
|
|
|
|
|
|
TENACITY_DLL_API FilePath BaseDir(); |
|
|
|
TENACITY_DLL_API FilePath ModulesDir(); |
|
|
|
|
|
|
|
/** \brief 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/ */ |
|
|
|
AUDACITY_DLL_API FilePath PlugInDir(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeDir(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeComponentsDir(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeCachePng(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeCacheAsCee(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeComponent(const wxString &Str); |
|
|
|
AUDACITY_DLL_API FilePath ThemeCacheHtm(); |
|
|
|
AUDACITY_DLL_API FilePath ThemeImageDefsAsCee(); |
|
|
|
TENACITY_DLL_API FilePath PlugInDir(); |
|
|
|
TENACITY_DLL_API FilePath ThemeDir(); |
|
|
|
TENACITY_DLL_API FilePath ThemeComponentsDir(); |
|
|
|
TENACITY_DLL_API FilePath ThemeCachePng(); |
|
|
|
TENACITY_DLL_API FilePath ThemeCacheAsCee(); |
|
|
|
TENACITY_DLL_API FilePath ThemeComponent(const wxString &Str); |
|
|
|
TENACITY_DLL_API FilePath ThemeCacheHtm(); |
|
|
|
TENACITY_DLL_API FilePath ThemeImageDefsAsCee(); |
|
|
|
|
|
|
|
// Obtain name of loaded module that contains address |
|
|
|
AUDACITY_DLL_API FilePath PathFromAddr(void *addr); |
|
|
|
TENACITY_DLL_API FilePath PathFromAddr(void *addr); |
|
|
|
|
|
|
|
AUDACITY_DLL_API bool IsPathAvailable( const FilePath & Path); |
|
|
|
AUDACITY_DLL_API wxFileNameWrapper DefaultToDocumentsFolder |
|
|
|
TENACITY_DLL_API bool IsPathAvailable( const FilePath & Path); |
|
|
|
TENACITY_DLL_API wxFileNameWrapper DefaultToDocumentsFolder |
|
|
|
(const wxString &preference); |
|
|
|
|
|
|
|
// If not None, determines a preference key (for the default path string) to |
|
|
@ -182,10 +182,10 @@ namespace FileNames |
|
|
|
LastUsed |
|
|
|
}; |
|
|
|
|
|
|
|
AUDACITY_DLL_API wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type); |
|
|
|
TENACITY_DLL_API wxString PreferenceKey(FileNames::Operation op, FileNames::PathType type); |
|
|
|
|
|
|
|
AUDACITY_DLL_API FilePath FindDefaultPath(Operation op); |
|
|
|
AUDACITY_DLL_API void UpdateDefaultPath(Operation op, const FilePath &path); |
|
|
|
TENACITY_DLL_API FilePath FindDefaultPath(Operation op); |
|
|
|
TENACITY_DLL_API void UpdateDefaultPath(Operation op, const FilePath &path); |
|
|
|
|
|
|
|
// F is a function taking a wxString, returning wxString |
|
|
|
template<typename F> |
|
|
@ -200,7 +200,7 @@ namespace FileNames |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
AUDACITY_DLL_API FilePath |
|
|
|
TENACITY_DLL_API FilePath |
|
|
|
SelectFile(Operation op, // op matters only when default_path is empty |
|
|
|
const TranslatableString& message, |
|
|
|
const FilePath& default_path, |
|
|
@ -211,11 +211,11 @@ namespace FileNames |
|
|
|
wxWindow *parent); |
|
|
|
|
|
|
|
// Useful functions for working with search paths |
|
|
|
AUDACITY_DLL_API void AddUniquePathToPathList(const FilePath &path, |
|
|
|
TENACITY_DLL_API void AddUniquePathToPathList(const FilePath &path, |
|
|
|
FilePaths &pathList); |
|
|
|
AUDACITY_DLL_API void AddMultiPathsToPathList(const wxString &multiPathString, |
|
|
|
TENACITY_DLL_API void AddMultiPathsToPathList(const wxString &multiPathString, |
|
|
|
FilePaths &pathList); |
|
|
|
AUDACITY_DLL_API void FindFilesInPathList(const wxString & pattern, |
|
|
|
TENACITY_DLL_API void FindFilesInPathList(const wxString & pattern, |
|
|
|
const FilePaths & pathList, |
|
|
|
FilePaths &results, |
|
|
|
int flags = wxDIR_FILES); |
|
|
@ -223,26 +223,26 @@ namespace FileNames |
|
|
|
/** \brief Protect against Unicode to multi-byte conversion failures |
|
|
|
* on Windows */ |
|
|
|
#if defined(__WXMSW__) |
|
|
|
AUDACITY_DLL_API char *VerifyFilename(const wxString &s, bool input = true); |
|
|
|
TENACITY_DLL_API char *VerifyFilename(const wxString &s, bool input = true); |
|
|
|
#endif |
|
|
|
|
|
|
|
//! Check location on writable access and return true if checked successfully. |
|
|
|
AUDACITY_DLL_API bool WritableLocationCheck(const FilePath& path); |
|
|
|
TENACITY_DLL_API bool WritableLocationCheck(const FilePath& path); |
|
|
|
|
|
|
|
// wxString compare function for sorting case, which is needed to load correctly. |
|
|
|
AUDACITY_DLL_API int CompareNoCase(const wxString& first, const wxString& second); |
|
|
|
TENACITY_DLL_API int CompareNoCase(const wxString& first, const wxString& second); |
|
|
|
|
|
|
|
// Create a unique filename using the passed prefix and suffix |
|
|
|
AUDACITY_DLL_API wxString CreateUniqueName(const wxString &prefix, |
|
|
|
TENACITY_DLL_API wxString CreateUniqueName(const wxString &prefix, |
|
|
|
const wxString &suffix = wxEmptyString); |
|
|
|
|
|
|
|
// File extension used for unsaved/temporary project files |
|
|
|
AUDACITY_DLL_API wxString UnsavedProjectExtension(); |
|
|
|
TENACITY_DLL_API wxString UnsavedProjectExtension(); |
|
|
|
|
|
|
|
AUDACITY_DLL_API |
|
|
|
TENACITY_DLL_API |
|
|
|
bool IsOnFATFileSystem(const FilePath &path); |
|
|
|
|
|
|
|
AUDACITY_DLL_API |
|
|
|
TENACITY_DLL_API |
|
|
|
//! Give enough of the path to identify the device. (On Windows, drive letter plus ':') |
|
|
|
wxString AbbreviatePath(const wxFileName &fileName); |
|
|
|
}; |
|
|
|