Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::SessionDirectory Class Reference

#include <session_directory.h>

Public Member Functions

 SessionDirectory (const std::string &session_path)
 
SessionDirectoryoperator= (const std::string &path)
 
const std::string root_path () const
 
const std::string sound_path () const
 
const std::string sound_path_2X () const
 
const std::string midi_path () const
 
const std::string peak_path () const
 
const std::string video_path () const
 
const std::string dead_path () const
 
const std::string export_path () const
 
const std::string backup_path () const
 
bool is_valid () const
 
bool create ()
 
const std::string sources_root () const
 
const std::string sources_root_2X () const
 

Private Member Functions

const std::string old_sound_path () const
 
const std::vector< std::string > sub_directories () const
 

Private Attributes

std::string m_root_path
 The path to the root of the session directory. More...
 

Static Private Attributes

static std::map< std::string, std::string > root_cache
 

Detailed Description

Definition at line 33 of file session_directory.h.

Constructor & Destructor Documentation

◆ SessionDirectory()

ARDOUR::SessionDirectory::SessionDirectory ( const std::string &  session_path)
Parameters
session_pathAn absolute path to a session directory.

Member Function Documentation

◆ backup_path()

const std::string ARDOUR::SessionDirectory::backup_path ( ) const
Returns
The absolute path to the directory that backup session files are stored.

◆ create()

bool ARDOUR::SessionDirectory::create ( )

Create the session directory and all the subdirectories.

Returns
true If a new session directory and subdirectories were created, otherwise false.
Postcondition
is_valid ()

◆ dead_path()

const std::string ARDOUR::SessionDirectory::dead_path ( ) const
Returns
The absolute path to the directory that source files are moved to when they are no longer part of the session.

◆ export_path()

const std::string ARDOUR::SessionDirectory::export_path ( ) const
Returns
The absolute path to the directory that audio files are created in by default when exporting.

◆ is_valid()

bool ARDOUR::SessionDirectory::is_valid ( ) const
Returns
true if session directory and all the required subdirectories exist.

◆ midi_path()

const std::string ARDOUR::SessionDirectory::midi_path ( ) const
Returns
the absolute path to the directory in which the session stores MIDI files, ie root_path()/interchange/session_name/midifiles

◆ old_sound_path()

const std::string ARDOUR::SessionDirectory::old_sound_path ( ) const
private
Returns
The path to the old style sound directory. It isn't created by create().

◆ operator=()

SessionDirectory& ARDOUR::SessionDirectory::operator= ( const std::string &  path)

Change the root path of this SessionDirectory object

◆ peak_path()

const std::string ARDOUR::SessionDirectory::peak_path ( ) const
Returns
The absolute path to the directory in which all peak files are stored for a session.

◆ root_path()

const std::string ARDOUR::SessionDirectory::root_path ( ) const
inline
Returns
the absolute path to the root directory of the session

Definition at line 50 of file session_directory.h.

◆ sound_path()

const std::string ARDOUR::SessionDirectory::sound_path ( ) const
Returns
the absolute path to the directory in which the session stores audio files.

If the session is an older session with an existing "sounds" directory then it will return a path to that directory otherwise it will return the new location of root_path()/interchange/session_name/audiofiles

◆ sound_path_2X()

const std::string ARDOUR::SessionDirectory::sound_path_2X ( ) const
Returns
the absolute path to the directory in which the session stores audio files for Ardour 2.X.

If the session is an older session with an existing "sounds" directory then it will return a path to that directory otherwise it will return the new location of root_path()/interchange/session_name/audiofiles

◆ sources_root()

const std::string ARDOUR::SessionDirectory::sources_root ( ) const
Returns
The path to the directory under which source directories are created for different source types. i.e root_path()/interchange/session_name

◆ sources_root_2X()

const std::string ARDOUR::SessionDirectory::sources_root_2X ( ) const
Returns
The path to the directory under which source directories are created for different source types in Ardour 2.X i.e root_path()/interchange/session_name

◆ sub_directories()

const std::vector<std::string> ARDOUR::SessionDirectory::sub_directories ( ) const
private
Returns
a vector containing the fullpath of all subdirectories.

◆ video_path()

const std::string ARDOUR::SessionDirectory::video_path ( ) const
Returns
The absolute path to the directory in which all video files are stored for a session.

Member Data Documentation

◆ m_root_path

std::string ARDOUR::SessionDirectory::m_root_path
private

The path to the root of the session directory.

Definition at line 156 of file session_directory.h.

◆ root_cache

std::map<std::string,std::string> ARDOUR::SessionDirectory::root_cache
staticprivate

Definition at line 158 of file session_directory.h.


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