Returns True if this URI names a file or
        if URI represents input/output stream.
559404
def names_singleton(self):
        
        if self.stream:
            return True
        else:
            return os.path.isfile(self.object_name)
873294
private static String getFileName(Context context, Uri uri){
        Cursor c = context.getContentResolver().query(uri, null, null, null, null);
        int nameIndex = c.getColumnIndex(OpenableColumns.DISPLAY_NAME);
        c.moveToFirst();
        String fileName = c.getString(nameIndex);
        c.close();
        return fileName;
    }
443872
def url_or_file_open(uri):
    """"""
    if (not re.match(r'''\w+:''', uri)):
        uri = 'file:' + uri
    return(urlopen(uri))
150872
private static boolean isOutFile(final File filePathName, final File inputMap) {
        final File relativePath = FileUtils.getRelativePath(inputMap.getAbsoluteFile(), filePathName.getAbsoluteFile());
        return !(relativePath.getPath().length() == 0 || !relativePath.getPath().startsWith(".."));
    }
988064
@Override
    public boolean isSameFile(final Path path1, final Path path2) throws IOException {

        // Only equal if pointing to same FS
        final FileSystem fs1 = path1.getFileSystem();
        final FileSystem fs2 = path2.getFileSystem();
        if (fs1 != fs2) {
            return false;
        }

        // Same if the normalized form points to the same location
        final String normalized1 = path1.normalize().toString();
        final String normalized2 = path2.normalize().toString();
        return normalized1.equals(normalized2);
    }
51814
public boolean isSameFile(JimfsPath path, FileSystemView view2, JimfsPath path2)
      throws IOException {
    if (!isSameFileSystem(view2)) {
      return false;
    }

    store.readLock().lock();
    try {
      File file = lookUp(path, Options.FOLLOW_LINKS).fileOrNull();
      File file2 = view2.lookUp(path2, Options.FOLLOW_LINKS).fileOrNull();
      return file != null && Objects.equals(file, file2);
    } finally {
      store.readLock().unlock();
    }
  }
1287898
public static boolean isAbsolute(final URI uri) {
        final String p = uri.getPath();
        return p != null && p.startsWith(URI_SEPARATOR);
    }
1275543
private static String checkFileURIScheme(Collection<URI> uris) {
    for (URI uri : uris)
      if (uri.getScheme().compareTo(JournalType.FILE.name().toLowerCase()) != 0)
        return "The specified path is not a file."
            + "Avatar supports file non-shared storage only... ";
    return "";
  }
1061041
public function stream_open(string $uri, string $mode, int $options, &$openedPath): bool
    {
        list($protocol, $path) = $this->parseUri($uri);

        $this->meta = $this->checkResource($path);


        $path = $this->meta->getRealPath();

        /** @noinspection ReturnFalseInspection */
        $this->body = $this->decorate($protocol, \file_get_contents($path), $path);

        return true;
    }
617846
public function isStream()
    {
        if ($this->data instanceof StreamInterface) {
            return true;
        }

        if (!is_resource($this->data)) {
            return false;
        }

        if (get_resource_type($this->data) !== 'stream') {
            return false;
        }

        return true;
    }
984144
public static boolean isFileURL(URL url) {
        String protocol = url.getProtocol();
        return (URL_PROTOCOL_FILE.equals(protocol) || protocol.startsWith(URL_PROTOCOL_VFS));
    }
714568
protected static boolean isAPIUri(Uri uri) {
        if (uri == null) {
            return false;
        }

        return getBaseUri().getHost().equals(uri.getHost());
    }
718706
public boolean remoteExists(URI uri) throws IOException {
    try {
      FileSystems.matchSingleFileSpec(uri.toString());
      return true;
    } catch (FileNotFoundException e) {
      return false;
    }
  }
738927
def isfile(self, relpath):
    """"""
    if self.isignored(relpath):
      return False
    return self._isfile_raw(relpath)
948761
public URI getInputFile() {
//        if (prop.containsKey(PROPERTY_INPUT_MAP_URI)) {
//            return toURI(prop.get(PROPERTY_INPUT_MAP_URI).toString());
//        }
//        return null;
        return files.values().stream()
                .filter(fi -> fi.isInput)
                .map(fi -> fi.src)
                .findAny()
                .orElse(null);

    }
41498
protected boolean isTargetUriInScope(String uri) {
		if (uri == null) {
			return false;
		}
		return getModel().getSession().isInScope(uri);
	}
417608
def is_file(self):
        
        if not isinstance(self.host_list, basestring):
            return False
        return os.path.exists(self.host_list)