code: private String[] matchLocalFiles(String local) throws SftpStatusException,
  			SshException {
  
  		// Resolve the search path as it may not be CWD
  		String actualDir;
  		String actualSearch;
  		int fileSeparatorIndex;
  		if ((fileSeparatorIndex = local.lastIndexOf(System
  				.getProperty("file.separator"))) > -1
  				|| (fileSeparatorIndex = local.lastIndexOf('/')) > -1) {
  			actualDir = resolveLocalPath(local.substring(0, fileSeparatorIndex))
  					.getAbsolutePath();
  			actualSearch = (fileSeparatorIndex < local.length() - 1) ? local
  					.substring(fileSeparatorIndex + 1) : "";
  		} else {
  			actualDir = lcwd;
  			actualSearch = local;
  		}
  
  		File f;
  		RegularExpressionMatching matcher;
  		File[] files;
  		switch (RegExpSyntax) {
  		case GlobSyntax:
  			f = new File(actualDir);
  			matcher = new GlobRegExpMatching();
  			files = listFiles(f);
  			break;
  		case Perl5Syntax:
  			f = new File(actualDir);
  			matcher = new Perl5RegExpMatching();
  			files = listFiles(f);
  			break;
  		default:
  			matcher = new NoRegExpMatching();
  			files = new File[1];
  			files[0] = new File(local);
  		}
  
  		return matcher.matchFileNamesWithPattern(files, actualSearch);
  	}
docs: Called by putFileMatches() to do regular expression pattern matching on
  the files in 'local''s parent directory.
  
  @param local
  @return String[]
  @throws SftpStatusException
  @throws SshException