Returns true if the respresenetd resource exists.
516054
public boolean exists()
    {
        if (_exists)
            return true;

        if (_urlString.endsWith("!/"))
        {
            String file_url=_urlString.substring(4,_urlString.length()-2);
            try{return newResource(file_url).exists();}
            catch(Exception e) {LogSupport.ignore(log,e); return false;}
        }
        
        boolean check=checkConnection();
        
        // Is this a root URL?
        if (_jarUrl!=null && _path==null)
        {
            // Then if it exists it is a directory
            _directory=check;
            return true;
        }
        else 
        {
            // Can we find a file for it?
            JarFile jarFile=null;
            if (check)
                // Yes
                jarFile=_jarFile;
            else
            {
                // No - so lets look if the root entry exists.
                try
                {
                    jarFile=
                        ((JarURLConnection)
                         ((new URL(_jarUrl)).openConnection())).getJarFile();
                }
                catch(Exception e)
                {
                       LogSupport.ignore(log,e);
                }
            }

            // Do we need to look more closely?
            if (jarFile!=null && _entry==null && !_directory)
            {
                // OK - we have a JarFile, lets look at the entries for our path
                Enumeration e=jarFile.entries();
                while(e.hasMoreElements())
                {
                    JarEntry entry = (JarEntry) e.nextElement();
                    String name=entry.getName().replace('\\','/');
                    
                    // Do we have a match
                    if (name.equals(_path))
                    {
                        _entry=entry;
                        // Is the match a directory
                        _directory=_path.endsWith("/");
                        break;
                    }
                    else if (_path.endsWith("/"))
                    {
                        if (name.startsWith(_path))
                        {
                            _directory=true;
                            break;
                        }
                    }
                    else if (name.startsWith(_path) && name.length()>_path.length() && name.charAt(_path.length())=='/')
                    {
                        _directory=true;
                        break;
                    }
                }
            }
        }    
        
        _exists= ( _directory || _entry!=null);
        return _exists;
    }
276007
public boolean exists(final String pTileSource, final long pMapTileIndex) {
        return 1 == getRowCount(primaryKey, getPrimaryKeyParameters(getIndex(pMapTileIndex), pTileSource));
    }
206958
def exists(self):
        """"""

        try:
            self.blob.reload()
            return True
        except google.cloud.exceptions.NotFound: return False
1024719
public static boolean createNewResourceEL(Resource res) {
	try {
	    res.createFile(false);
	    return true;
	}
	catch (IOException e) {
	    return false;
	}
    }
1319432
protected boolean resourceIsValid(CmsResource resource) {

        if (!resource.getRootPath().startsWith(m_basePath)) {
            return false;
        }
        if (m_requireFile & resource.isFolder()) {
            return false;
        }
        if (m_requireFolder & resource.isFile()) {
            return false;
        }
        return true;
    }
563593
public static boolean resourceExists(String name) {
        Objects.requireNonNull(name, Required.NAME.toString());
        
        URL resource = null;
        try {
            resource = Resources.getResource(name);            
        } catch (IllegalArgumentException e) { // NOSONAR Intentionally not logging or throwing this exception
           // Intentionally left blank
        }
        
        return resource != null;
    }
1167492
def uid_exists(uid):
    """"""
    try:
        pwd.getpwuid(uid)
        uid_exists = True
    except KeyError:
        uid_exists = False
    return uid_exists
119379
private boolean resourceExists(CmsObject cms, String resource) {

        try {
            cms.readResource(resource, CmsResourceFilter.ALL);
            return true;
        } catch (CmsException e) {
            return false;
        }
    }
127921
def exists(self, path, **kwargs):
        """"""
        try:
            self.get_file_status(path, **kwargs)
            return True
        except HdfsFileNotFoundException:
            return False
207485
def exists(self):
        
        try:
            key = self.key
        except DoesNotExist:
            """
            If the object doesn't exists anymore, its PK is deleted, so the
            "self.key" call will raise a DoesNotExist exception. We catch it
            to return False, as the field doesn't exists too.
            """
            return False
        else:
            return self.connection.exists(key)
856136
private static boolean parentExists(Resource res) {
	res = res.getParentResource();
	return res != null && res.exists();
    }
1258432
def exists(device=''):
    '''
    
    '''
    if os.path.exists(device):
        dev = os.stat(device).st_mode

        if stat.S_ISBLK(dev):
            return True

    return False
111130
public boolean existRunnableNodes(ResourceType type) {
    RunnableIndices r = typeToIndices.get(type);
    return r.existRunnableNodes();
  }
327669
public static boolean doesResourceExist(final String resource, final ResourceLoader resourceLoader) {
        try {
            if (StringUtils.isNotBlank(resource)) {
                val res = resourceLoader.getResource(resource);
                return doesResourceExist(res);
            }
        } catch (final Exception e) {
            LOGGER.warn(e.getMessage(), e);
        }
        return false;
    }
166584
def exists(self, **kwargs):
        """"""
        kwargs.pop('partition', None)
        kwargs['transform_name'] = True
        return self._exists(**kwargs)
69070
def exists(self, storagemodel:object, modeldefinition = None) -> bool:
        
        exists = False

        blobservice = modeldefinition['blobservice']
        container_name = modeldefinition['container']
        blob_name = storagemodel.name

        try:
            blobs = self.list(storagemodel, modeldefinition, where=storagemodel.name)
            if len(blobs) == 1:
                storagemodel.__mergeblob__(blobs[0])
                exists = True
                 
        except Exception as e:
            msg = 'can not retireve blob {} from storage because {!s}'.format(blob_name, e)
            raise AzureStorageWrapException(storagemodel, msg=msg)

        return exists
1287336
def rbd_exists(service, pool, rbd_img):
    """"""
    try:
        out = check_output(['rbd', 'list', '--id',
                            service, '--pool', pool])
        if six.PY3:
            out = out.decode('UTF-8')
    except CalledProcessError:
        return False

    return rbd_img in out