#if FAT_GETDIRENTRY
	bool Fat_GetDirEntry(
			fat_state_t* pFS, 
			file_handle_t*	hParent,
			UINT16	index,
			fat_direntry_t*	resultDirEntry)
	{
		file_handle_t	hf;
		UINT32			address;
		UINT16			i, count;
		fat_direntry_t  dirEntry;
		bool			ret;
	
		hf.StartCA = hParent->StartCA;
		hf.CurrentCA = hParent->StartCA;
		hf.Flags = hParent->Flags;
		
		if( hParent->Flags & FILE_HANDLE_FLAG_ROOT ) {
			hf.CurrentPos = index << 5;
		} else {
			count = index << (pFS->SecPerClus_bit + pFS->BytsPerSec_bit - 5);
			for( i = 0; i < count; i++ ) {
				ret = _fat_readChain( pFS, hf.CurrentCA, &hf.CurrentCA, 1 );
				RETF(ret);
			}
			address = index >> 5;
			hf.CurrentPos = address & (pFS->BytsPerClus - 1);
		}
		address = _Fat_GetFilePos( pFS, &hf );
	
		Sd_SetBlockLength(5); // 32
		ret = Sd_read( &dirEntry, address, FAT_DIRENTRY_SIZE );
		RETF(ret);
		
		if( resultDirEntry )
			memcpy( resultDirEntry, &dirEntry, sizeof(dirEntry) );
		
		return true;	
	}
#endif