diff options
author | Henri Herscher <henri@oreka.org> | 2006-07-26 16:23:53 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-07-26 16:23:53 +0000 |
commit | 71001d96e240d03a98a73688060d476dd5f7c875 (patch) | |
tree | 6643ce2ec2ba8a3da7aed6a3648ea6219a797358 /orkbasecxx/Utils.cpp | |
parent | 0f20be2ec5d75afc343cbe7ec35e3480723b4e99 (diff) |
Added command line mcf file transcoding -
The syntax is: #orkaudio transcode myfile.mcf
- The output has the format specified in config.xml.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@310 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/Utils.cpp')
-rw-r--r-- | orkbasecxx/Utils.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/orkbasecxx/Utils.cpp b/orkbasecxx/Utils.cpp index c1ba665..cec44eb 100644 --- a/orkbasecxx/Utils.cpp +++ b/orkbasecxx/Utils.cpp @@ -23,6 +23,21 @@ CStdString FileBaseName(CStdString& path) return result; } +CStdString FilePath(CStdString& path) +{ + CStdString result; + int lastSeparatorPosition = path.ReverseFind('/'); + if(lastSeparatorPosition == -1) + { + lastSeparatorPosition = path.ReverseFind('\\'); + } + if(lastSeparatorPosition != -1 && path.GetLength()>3) + { + result = path.Left(lastSeparatorPosition + 1); + } + return result; +} + CStdString FileStripExtension(CStdString& filename) { CStdString result; |