Commit b241feff authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander Trofimov

[ios] таблицы

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62373 954022d7-b5bf-4e40-9824-e11837661b57
parent 9eadc725
......@@ -19,6 +19,11 @@
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#elif _IOS
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#endif
namespace NSDirectory
......@@ -115,12 +120,41 @@ namespace NSDirectory
return;
#endif
#if 0
// нормально работает и линукс версия
//#if 0
// // нормально работает и линукс версия
#ifdef _IOS
return GetFiles2_ios(strDirectory, oArray, bIsRecursion);
#endif
BYTE* pUtf8 = NULL;
LONG lLen = 0;
NSFile::CUtf8Converter::GetUtf8StringFromUnicode(strDirectory.c_str(), strDirectory.length(), pUtf8, lLen, false);
DIR *dp;
struct dirent *dirp;
if((dp = opendir((char*)pUtf8)) != NULL)
{
while ((dirp = readdir(dp)) != NULL)
{
if(DT_REG == dirp->d_type)
{
std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name));
oArray.Add(strDirectory + L"/" + sName);
}
if (bIsRecursion && DT_DIR == dirp->d_type)
{
if(dirp->d_name[0] != '.')
{
std::wstring sName = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)dirp->d_name, strlen(dirp->d_name));
GetFiles2(strDirectory + L"/" + sName, oArray, bIsRecursion);
}
}
}
closedir(dp);
}
delete [] pUtf8;
return;
//return GetFiles2_ios(strDirectory, oArray, bIsRecursion);
#endif
//#endif
}
static CArray<std::wstring> GetFiles(std::wstring strDirectory, bool bIsRecursion = false)
......
......@@ -5,8 +5,6 @@
#undef BOOL
#endif
#ifdef _IOS
#import <UIKit/UIKit.h>
CArray<std::wstring> CApplicationFonts::GetSetupFontFiles_ios()
......@@ -44,5 +42,3 @@ namespace NSDirectory
}
}
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment