Copying a folder into Userdata - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93) +--- Thread: Copying a folder into Userdata (/showthread.php?tid=199077) |
Copying a folder into Userdata - Wendy Pennells - 2014-07-01 Hi everyone. I have been trying to learn how to build xbmc for a few months now and I have implemented a few patches that I have found on the web and got them to work but there is something I have been stuck on now for a week and I have googled non stop but can't seem to find examples or answers to what I am trying to achieve. I have added in a multi language patch for the onscreen keyboard and I want to be able to copy the entire folder over to the Userdata folder. In application.cpp I have found the following. Code: static void CopyUserDataIfNeeded(const CStdString &strPath, const CStdString &file) Code: // copy required files If I add my files one at a time to the end of this then they will work, eg. Code: CopyUserDataIfNeeded("special://masterprofile/", "/languagekeys/english.xml"); But I want to be able to copy over the entire "languagekeys" folder in one go as there are loads of files in there and they will be changing often. I think I need a URIUtils::GetDirectory function but I have no idea how I would implement this. If any of you kind people could please point me in the right direction or tell me what code I need that would be brilliant. Also can anyone suggest any good reading material to help me understand the coding better. Thank you very much. Wendy |