ardour
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 midi_patch_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
 
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...
 

Detailed Description

Definition at line 29 of file session_directory.h.

Constructor & Destructor Documentation

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

Definition at line 39 of file session_directory.cc.

Member Function Documentation

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 ()

Definition at line 53 of file session_directory.cc.

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.

Definition at line 161 of file session_directory.cc.

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.

Definition at line 167 of file session_directory.cc.

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

Definition at line 68 of file session_directory.cc.

const std::string ARDOUR::SessionDirectory::midi_patch_path ( ) const
Returns
the absolute path to the directory in which the session stores MIDNAM patch files, ie root_path()/interchange/session_name/patchfiles

Definition at line 143 of file session_directory.cc.

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

Definition at line 137 of file session_directory.cc.

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().

Definition at line 84 of file session_directory.cc.

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

Change the root path of this SessionDirectory object

Definition at line 46 of file session_directory.cc.

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.

Definition at line 155 of file session_directory.cc.

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

Definition at line 46 of file session_directory.h.

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

Definition at line 122 of file session_directory.cc.

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

Definition at line 131 of file session_directory.cc.

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

Definition at line 90 of file session_directory.cc.

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

Definition at line 106 of file session_directory.cc.

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

Definition at line 173 of file session_directory.cc.

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.

Definition at line 149 of file session_directory.cc.

Member Data Documentation

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

The path to the root of the session directory.

Definition at line 153 of file session_directory.h.


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