void java_io_RandomAccessFile::open(java_lang_String_p path, jint mode) {

	FileSysString sysPath(path);

	int fd = (int)fox_file_open(sysPath, (FOX_OPEN_MODE)(mode != java_io_RandomAccessFile__O_RDONLY ? FOX_READ_WRITE | FOX_CREATE : FOX_READ));
	if ((FOX_HFILE)fd == FOX_HERROR) {
		THROW_EX_NEW$(java_io_FileNotFoundException, ());
	}
void CSsmCommandListResourceReaderImpl::CInitialiser::DoInitialiseFirstStepL()
	{
	if (!iResourcePool.IsEmpty())
		{
		// already initialised, don't count this as an error
		iAction = EIdle;
		return;
		}

	// get list of command list resource filenames
	TFileName path(iPath);
	_LIT(KStar, "*");
	path.Append(KStar);
	const TUid KUidResourceFile = {0x101f4a6b};
	__ASSERT_ALWAYS(iResourceFileEntries == NULL, PanicNow(KPanicCmdResourceReader, ENonNullResourceFileEntries));
	// The error cannot be KErrPathNotFound as fallback will be used if there is not startup path
	// Even if there are no resource files, this succeeds
	// User::LeaveIfError handles other error conditions
	User::LeaveIfError(iFs.GetDir(path, TUidType(KUidResourceFile, TUid::Uid(KUidSsmCommandListResourceFile)), ESortNone, iResourceFileEntries));
	iEntryIndex = iResourceFileEntries->Count();

#ifdef SYMBIAN_SSM_FLEXIBLE_MERGE
#ifdef __WINS__
	if(!IsExtendedFolderDisabled())
	    {
	    TFileName extPath(iPath);
	    extPath.Replace(iPath.Length() - 1, 1, KExtendedCommandListPath);
	    iExtendedPath.CreateL(extPath);
	    DEBUGPRINT2(_L("Extended list path is %S"), &extPath);

	    extPath.Append(KStar);
	    const TInt extErr = (iFs.GetDir(extPath, TUidType(KUidResourceFile, TUid::Uid(KUidSsmCommandListResourceFile)), ESortNone, iExtendedResourceFileEntries));
	    if (KErrNone == extErr)
	        {
	        iExtendedEntryIndex = iExtendedResourceFileEntries->Count();
	        DEBUGPRINT2(_L("Number of resource files in extended folder : %d"), iExtendedEntryIndex);
	        }	    
	    }
#endif //__WINS__

	DEBUGPRINT2(_L("Number of resource files in ROM Drive : %d"),iEntryIndex );
	// Now, get list of command list resource filenames from system drive too
	TFileName sysPath(iSystemDrivePath);
	sysPath.Append(KStar);
	TInt err = (iFs.GetDir(sysPath, TUidType(KUidResourceFile, TUid::Uid(KUidSsmCommandListResourceFile)), ESortNone, iRssFileEntriesInSysDrive));
	if (KErrNone == err)
		{
		iSysDriveEntryIndex = iRssFileEntriesInSysDrive->Count();
		DEBUGPRINT2(_L("Number of resource files in System Drive : %d"),iSysDriveEntryIndex );
		}
	// all other error conditions are ignored as there is no compulsion for resource files to be present on system drive
	else if(KErrPathNotFound == err)
		{
		//the path for SCLs on system drive does not exist
		DEBUGPRINT1(_L("System Drive does not contain command lists"));
		}
	if(iEntryIndex == 0 && iSysDriveEntryIndex == 0)
		{
		DEBUGPRINT3(_L("Command list resource file directories (%S) and (%S) do not contain any command list resource files"), &path, &sysPath);
		SSMLOGLEAVE(KErrNotFound);
		}
#else
	if (iEntryIndex == 0)
		{
		DEBUGPRINT2(_L("Command list resource file directory (%S) does not contain any command list resource files"), &path);
		SSMLOGLEAVE(KErrNotFound);
		}
#endif
	iAction = EInitialiseNextStep;
	}