Search from proto_path only. For full protoc compatibility, use this.
<p>

<pre>
Enable via:
-Dproto_path=$path -Dproto_search_strategy=1
</pre>
324594
protected Proto searchFromProtoPathOnly(String path, Proto importer) throws Exception
    {
        // proto_path
        File protoFile;
        for (File dir : __protoLoadDirs)
        {
            if ((protoFile = new File(dir, path)).exists())
                return loadFrom(protoFile, importer);
        }

        throw new IllegalStateException("Imported proto " + path +
                " not found. (" + importer.getSourcePath() + ")");
    }
488429
public T path(String path) {
        if (path.length() == 0) {
            this.path += encodePath(path);
        } else {
            this.path += "/" + encodePath(path);
        }
        return returnThis();
    }
1214380
def find_protoc(path=os.environ['PATH']):
    '''
    
    '''
    protoc_filename = 'protoc'

    bin_search_paths = path.split(':') or []
    for search_path in bin_search_paths:
        bin_path = os.path.join(search_path, protoc_filename)
        if os.path.isfile(bin_path) and os.access(bin_path, os.X_OK):
            return bin_path

    raise ProtocNotFound("Protobuf compiler not found")
1240823
@Override
  public boolean ruleFileExists(String path) {
    String completePath = getCompleteRulesUrl(path);
    return ResourceDataBroker.class.getResource(completePath) != null;
  }
1173005
public static PrototypeMeasurementFilter loadFromPath(String path) throws IOException {
    PrototypeMeasurementFilterSpecification spec =
        PrototypeMeasurementFilterSpecification.loadFromPath(path);
    return new PrototypeMeasurementFilter(spec);
  }
36611
public DocPath resolve(DocPath p) {
        if (p == null || p.isEmpty())
            return this;
        if (path.isEmpty())
            return p;
        return new DocPath(path + "/" + p.getPath());
    }
1158803
function(path) {
    var bind = path;
    if (process.platform === 'win32') {
      bind = path.replace(/\\/g, '/').replace('C:/', 'c:/');
    }
    return bind;
  }
249809
@Override
	public JoinableResourceBundle resolveBundleForPath(String path) {

		JoinableResourceBundle theBundle = null;
		for (Iterator<JoinableResourceBundle> it = bundles.iterator(); it.hasNext();) {
			JoinableResourceBundle bundle = it.next();
			if (bundle.getId().equals(path) || bundle.belongsToBundle(path)) {
				theBundle = bundle;
				break;
			}
		}
		return theBundle;
	}
600554
protected void checkPath(Path path) {
    URI uri = path.toUri();
    if (uri.getScheme() == null)                // fs is relative 
      return;
    String thisScheme = this.getUri().getScheme();
    String thatScheme = uri.getScheme();
    String thisAuthority = this.getUri().getAuthority();
    String thatAuthority = uri.getAuthority();
    //authority and scheme are not case sensitive
    if (thisScheme.equalsIgnoreCase(thatScheme)) {// schemes match
      if (thisAuthority == thatAuthority ||       // & authorities match
          (thisAuthority != null && 
           thisAuthority.equalsIgnoreCase(thatAuthority)))
        return;

      if (thatAuthority == null &&                // path's authority is null
          thisAuthority != null) {                // fs has an authority
        URI defaultUri = getDefaultUri(getConf()); // & is the conf default 
        if (thisScheme.equalsIgnoreCase(defaultUri.getScheme()) &&
            thisAuthority.equalsIgnoreCase(defaultUri.getAuthority()))
          return;
        try {                                     // or the default fs's uri
          defaultUri = get(getConf()).getUri();
        } catch (IOException e) {
          throw new RuntimeException(e);
        }
        if (thisScheme.equalsIgnoreCase(defaultUri.getScheme()) &&
            thisAuthority.equalsIgnoreCase(defaultUri.getAuthority()))
          return;
      }
    }
    throw new IllegalArgumentException("Wrong FS: "+path+
                                       ", expected: "+this.getUri());
  }
1352600
private ResourcePathNode<D> navigateFrom(ResourcePathNode<D> resourcePath) {

    if (isParentDirectory()) {
      ResourcePathNode<D> result = resourcePath;
      ResourcePathNode<D> segment = this;
      do {
        assert (segment.isParentDirectory());
        if (result.isParentDirectory()) {
          return new ResourcePathNode<>(result, segment.name, segment.data);
        } else {
          result = result.navigateUp();
        }
        segment = segment.parent;
      } while (segment.parent != null);
      return result;
    } else if (this.parent == null) {
      return resourcePath;
    } else {
      return new ResourcePathNode<>(this.parent.navigateFrom(resourcePath), this.name, this.data);
    }
  }
58216
private boolean isDirectoryTraverse(StringBuffer path)
	{
			
		boolean directoryTraverse = false;
			
		String matchString = path.toString();
			
		//PM82876 Start
		if (WCCustomProperties.ALLOW_DOTS_IN_NAME) {
		    // The fileName can have .. , check for the failing conditions only.
		    if (matchString.indexOf("..") > -1) {
		        if( (matchString.indexOf("/../") > -1) || (matchString.indexOf("\\..\\") > -1) || 
		                        matchString.startsWith("../") || matchString.endsWith("/..") || 
		                        matchString.startsWith("..\\")|| matchString.endsWith("\\..")) 
		        {
		            directoryTraverse = true;
		            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
		                logger.logp(Level.FINE, CLASS_NAME, "isDirectoryTraverse", "bad path :" + matchString);
		        }
		    }    
		}
                else{//PM82876 End

                    /**
                     * Do not allow ".." to appear in a path as it allows one to serve files from anywhere within
                     * the file system.
                     * Also check to see if the path or URI ends with '/', '\', or '.' .
                     * PQ44346 - Allow files on DFS to be served.
                     */
                    if ( (matchString.lastIndexOf("..") != -1) && (!matchString.startsWith("/...") )) 
                    {
                        directoryTraverse = true;
                    }

                }
		if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
			logger.logp(Level.FINE, CLASS_NAME,"isDirectoryTraverse", "returning" + directoryTraverse + " , matchstring :" + matchString);
			
		return directoryTraverse;
	}
317779
def _checkpath(self, path):
        
        if path.startswith("/") or ".." in path or path.strip() != path:
            raise NotFoundException()
450216
public ProtoFile protoFile(String path) {
    for (ProtoFile protoFile : protoFiles) {
      if (protoFile.location().getPath().equals(path)) {
        return protoFile;
      }
    }
    return null;
  }
343843
public FileScanner setSearchPath(String... srPath) {
        if (srPath == null || srPath.length == 0) {
            this.srPath = new String[0];
        } else {
            this.srPath = srPath;
        }
        return this;
    }
1264650
def findByPath(self, rel, path):
        """"""
        if((path=="") or (path=="/")):
            return(self)
        (front,dummy,rest) = path.lstrip("/").partition("/")
        for child in self.items:
            if front in child.values(rel):
                return child.findByPath(rel, rest)
        return None
378524
public CmsGallerySearchResult searchByPath(String path, Locale locale) throws CmsException {

        I_CmsSearchDocument sDoc = m_index.getDocument(CmsSearchField.FIELD_PATH, path);
        CmsGallerySearchResult result = null;
        if ((sDoc != null) && (sDoc.getDocument() != null)) {
            result = new CmsGallerySearchResult(sDoc, m_cms, 100, locale);
        } else {
            CmsResource res = m_cms.readResource(path, CmsResourceFilter.IGNORE_EXPIRATION);
            result = new CmsGallerySearchResult(m_cms, res);
        }
        return result;
    }
131821
def resolve_path(filename: Path) -> typing.Union[Path, None]:
    
    current = Path.cwd()
    # Stop search at home directory
    sentinel_dir = Path.home().parent.resolve()
    while current != sentinel_dir:
        target = Path(current) / Path(filename)
        if target.exists():
            return target.resolve()
        else:
            current = current.parent.resolve()

    return None