VFS vfs = VFSManager.getVFSForPath(directory); filename = vfs.constructPath(directory,filename);
	public void ok()	{		VFS.DirectoryEntry[] files = browser.getSelectedFiles();		String directory = browser.getDirectory();		if(files.length == 0)		{			filename = filenameField.getText();			if(filename.length() == 0)			{				getToolkit().beep();				return;			}		}		else		{			for(int i = 0; i < files.length; i++)			{				VFS.DirectoryEntry file = files[i];				if(file.type == VFS.DirectoryEntry.FILESYSTEM					|| file.type == VFS.DirectoryEntry.DIRECTORY)				{					browser.setDirectory(file.path);					return;				}				else if(browser.getMode() == VFSBrowser.SAVE_DIALOG)					filename = file.path;			}		}		VFS vfs = VFSManager.getVFSForPath(directory);		filename = vfs.constructPath(directory,filename);		if(browser.getMode() == VFSBrowser.SAVE_DIALOG)		{			if(vfs instanceof FileVFS && doFileExistsWarning(filename))				return;		}		isOK = true;		dispose();	}