23#include <core/config.h>
50 ERRORLOG( QString(
"unknown mode : %1" ).arg( mode ) );
63 if ( !pPattern->
save_file( drumkitName, pSong->getAuthor(), pSong->getLicense(), fileInfo.absoluteFilePath(),
true ) ) {
67 return fileInfo.absoluteFilePath();
86 ERRORLOG( QString(
"unknown mode : %1" ).arg( mode ) );
99 if ( !playlist->
save_file( fileInfo.absoluteFilePath(), fileInfo.fileName(),
true, relativePaths) ) {
103 return fileInfo.absoluteFilePath();
static QString savePlaylist(SaveMode mode, const QString &fileName, Playlist *playlist, bool relativePaths)
static QString savePattern(SaveMode mode, const QString &fileName, const Pattern *pattern, std::shared_ptr< Song > song, const QString &drumkitName)
static QString playlist_path(const QString &pl_name)
returns user playlist path, add file extension
static bool file_exists(const QString &path, bool silent=false)
returns true if the given path is an existing regular file
static QString pattern_path(const QString &dk_name, const QString &p_name)
returns user patterns path, add file extension
static bool path_usable(const QString &path, bool create=true, bool silent=false)
returns true if the path is a readable and writable regular directory, create if it not exists
static QString tmp_file_path(const QString &base)
touch a temporary file under tmp_dir() and return it's path.
Pattern class is a Note container.
bool save_file(const QString &drumkit_name, const QString &author, const License &license, const QString &pattern_path, bool overwrite=false) const
save a pattern into an xml file
bool save_file(const QString &pl_path, const QString &name, bool overwrite, bool useRelativePaths)