-#ifdef UNDER_CE
- if( GetFileAttributes( psz_wpath ) & FILE_ATTRIBUTE_DIRECTORY )
-#else
- if( GetFileAttributes( psz_path ) & FILE_ATTRIBUTE_DIRECTORY )
-#endif
- {
- AllocatePluginDir( p_this, psz_path, i_maxdepth - 1 );
- }
- else if( i_len > strlen( LIBEXT )
- /* We only load files ending with LIBEXT */
- && !strncasecmp( psz_path + strlen( psz_path)
- - strlen( LIBEXT ),
- LIBEXT, strlen( LIBEXT ) ) )
- {
- WIN32_FILE_ATTRIBUTE_DATA attrbuf;
- int64_t i_time = 0, i_size = 0;
-
-#ifdef UNDER_CE
- if( GetFileAttributesEx( psz_wpath, GetFileExInfoStandard,
- &attrbuf ) )
-#else
- if( GetFileAttributesEx( psz_path, GetFileExInfoStandard,
- &attrbuf ) )
-#endif
- {
- i_time = attrbuf.ftLastWriteTime.dwHighDateTime;
- i_time <<= 32;
- i_time |= attrbuf.ftLastWriteTime.dwLowDateTime;
- i_size = attrbuf.nFileSizeHigh;
- i_size <<= 32;
- i_size |= attrbuf.nFileSizeLow;
- }
- psz_file = psz_path;
-
- AllocatePluginFile( p_this, psz_file, i_time, i_size );
- }
- }
- while( !p_this->p_libvlc->b_die && FindNextFile( handle, &finddata ) );
-
- /* Close the directory */
- FindClose( handle );
-
-#else
- dir = opendir( psz_dir );
- if( !dir )
- {
- return;
- }
-
- i_dirlen = strlen( psz_dir );
-
- /* Parse the directory and try to load all files it contains. */
- while( !p_this->p_libvlc->b_die && ( file = readdir( dir ) ) )
- {
- struct stat statbuf;
- unsigned int i_len;
- int i_stat;