Flag indicating if storage is available.

        Returns:
            bool: True if available. False otherwise.
331654
def HasStorage(self):
        
        from neo.Core.State.ContractState import ContractPropertyState
        return self.ContractProperties & ContractPropertyState.HasStorage > 0
827993
private static boolean checkDownloadPath() {
        if (Checker.isNotEmpty(storageFolder)) {
            File file = new File(storageFolder);
            if (!file.exists() && file.mkdirs()) {
                logger.info("mkdir '" + storageFolder + "' success");
            }
            return true;
        }
        return false;
    }
1200463
def available(self, context):
	
		
		
		if self.__available is None:
			avail = False
			name = context.resolve(self.__name)
			for box in self.__box_list():
				if box["name"] == name and box["version"] == "0":
					avail = True
					break
			self.__available = avail
		return self.__available
1177346
def available(self) -> bool:
        """"""
        # Both ability to retrieve state from MyQ cloud AND device itself has
        # to be online.
        is_available = self.api.online and \
            next(
                attr['Value'] for attr in
                self._device_json.get('Attributes', [])
                if attr.get('AttributeDisplayName') == 'online') == "True"

        return is_available
172311
def available(self):
        

        for module_name in self.packages:
            if importlib.util.find_spec(module_name):
                return True
        return False
51609
function isLocalStorageAvailable() {
	if(typeof localStorage === "object") {
		try {
			localStorage.setItem("smde_localStorage", 1);
			localStorage.removeItem("smde_localStorage");
		} catch(e) {
			return false;
		}
	} else {
		return false;
	}

	return true;
}
353848
def file_exists(self, fid):
        
        res = self.get_file_size(fid)
        if res is not None:
            return True
        return False
483243
def get_storage_info(self, human=False):
        
        res = self._req_get_storage_info()
        if human:
            res['total'] = humanize.naturalsize(res['total'], binary=True)
            res['used'] = humanize.naturalsize(res['used'], binary=True)
        return res
1217016
def resources_availability(self):
        """"""
        # Flatten the list.
        availabilities = list(
            chain(
                *[org.check_availability() for org in self.organizations]
            )
        )
        # Filter out the unknown
        availabilities = [a for a in availabilities if type(a) is bool]
        if availabilities:
            # Trick will work because it's a sum() of booleans.
            return round(100. * sum(availabilities) / len(availabilities), 2)
        # if nothing is unavailable, everything is considered OK
        return 100
261681
def _available(name, ret):
    '''
    
    '''
    avail = False
    if 'service.available' in __salt__:
        avail = __salt__['service.available'](name)
    elif 'service.get_all' in __salt__:
        avail = name in __salt__['service.get_all']()
    if not avail:
        ret['result'] = False
        ret['comment'] = 'The named service {0} is not available'.format(name)
    return avail
1212704
def is_capable(cls, requested_capability):
        
        for c in requested_capability:
            if not c in cls.capability:
                return False
        return True
34490
def is_provided(self, name):
        
        if name in self._storage:
            return True
        elif name in self._providers:
            return True
        elif name.startswith('rollout:'):
            rollout_name = name[8:]
        else:
            return False
976705
function isStorageAvailable() {
  var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : LOCAL_STORAGE;
  var storage;

  try {
    storage = window[type];
    var x = STORAGE_TEST;
    storage.setItem(x, x);
    storage.removeItem(x);
    return true;
  } catch (e) {
    return e instanceof DOMException && (e.code === ERROR_CODE.NOT_FIREFOX || // Everything except Firefox
    e.code === ERROR_CODE.FIREFOX || // Firefox
    e.name === ERROR_TYPE.QUOTA_EXCEEDED_ERROR || // Everything except Firefox
    e.name === ERROR_TYPE.NS_ERROR_DOM_QUOTA_REACHED) && // Firefox
    storage.length !== 0;
  }
}
79847
def check_availability(self):
        
        # Only check remote resources.
        remote_resources = [resource
                            for resource in self.resources
                            if resource.filetype == 'remote']
        if not remote_resources:
            return []
        return [resource.check_availability() for resource in remote_resources]
253970
def is_available(self) -> bool:
        """"""
        status_response = self.get_state(
            'api/host/daemonCheck.json'
        )

        if not status_response:
            return False

        return status_response.get('result') == 1
1255951
public function isAvailable(): bool
    {
        foreach ($this->items as $item) {
            if ($item->isVisible()) {
                return true;
            }
        }

        return false;
    }
7004
def dir_exists(self):
        

        r = requests.request(self.method if self.method else 'HEAD', self.url, **self.storage_args)
        try: r.raise_for_status()
        except Exception: return False

        return True