Proper folder / file distinction in plugin loading.
This commit is contained in:
@@ -287,6 +287,20 @@ bool cFile::Rename(const AString & a_OrigFileName, const AString & a_NewFileName
|
||||
|
||||
|
||||
|
||||
bool cFile::IsFolder(const AString & a_Path)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return ((GetFileAttributes(a_Path.c_str()) & FILE_ATTRIBUTE_DIRECTORY) != 0);
|
||||
#else
|
||||
struct stat st;
|
||||
return ((stat(a_Path.c_str(), &st) == 0) && S_ISDIR(st.st_mode));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int cFile::Printf(const char * a_Fmt, ...)
|
||||
{
|
||||
AString buf;
|
||||
|
||||
Reference in New Issue
Block a user