Get a persistent storage place.
969129
function () {
            var res = this._persistentStorage;
            if (res == null) {
                if (this.data) {
                    res = this.data[Aria.FRAMEWORK_PREFIX + "persist::" + this.tplClasspath];
                    if (res == null) {
                        res = {};
                        this.data[Aria.FRAMEWORK_PREFIX + "persist::" + this.tplClasspath] = res;
                    }
                } else {
                    res = {};
                }
                this._persistentStorage = res;
            }
            return res;
        }
613044
def _explore_storage(self):
        """"""
        path = ''
        dirs = [path]
        while dirs:
            path = dirs.pop()
            subdirs, files = self.media_storage.listdir(path)
            for media_filename in files:
                yield os.path.join(path, media_filename)
            dirs.extend([os.path.join(path, subdir) for subdir in subdirs])
586456
def storages(self):
        
        if self._storages.get(connection.schema_name, None) is None:
            schema_storages = OrderedDict()

            for prefix, root in self.locations:
                filesystem_storage = TenantStaticFilesStorage(location=root)
                filesystem_storage.prefix = prefix
                schema_storages[root] = filesystem_storage

            self._storages[connection.schema_name] = schema_storages

        return self._storages[connection.schema_name]
670635
private void persistRealmChanges() {
    configManager.persistProperties(realm.getProperties(), new File(applicationContentDir, PersistablePropertiesRealm.REALM_FILE_NAME), null);
  }
1015205
def _getStore(self):
        
        storeDir = self.store.newDirectory(self.indexDirectory)
        if not storeDir.exists():
            store = Store(storeDir)
            self._initStore(store)
            return store
        else:
            return Store(storeDir)
870460
def _get_storage(cls, uri):
        
        driver = cls._get_driver(uri.scheme)
        key = uri.username
        secret = uri.password
        container = uri.netloc
        driver_kwargs = {}
        if uri.scheme.startswith('s3'):
            if not key:
                key = os.environ.get('AWS_ACCESS_KEY_ID')
            if not secret:
                secret = os.environ.get('AWS_SECRET_ACCESS_KEY')
            if not (key and secret and container):
                raise ValueError('For S3 you must provide an access key ID, secret access key, and bucket name')
            # No way to store this in the URI, what about a CLI option too?
            if 'AWS_TOKEN' in os.environ:
                driver_kwargs['token'] = os.environ['AWS_TOKEN']
        elif uri.scheme == 'local':
            parts = []
            if uri.netloc:
                parts.append(uri.netloc)
            if uri.path:
                parts.append(uri.path)
            if not parts:
                parts.append('.')
            base_path = os.path.abspath(''.join(parts))
            key = os.path.dirname(base_path)
            container = os.path.basename(base_path)
        storage = driver(key, secret, **driver_kwargs)
        try:
            return storage.get_container(container)
        except ContainerDoesNotExistError:
            return storage.create_container(container)
802078
public function getStorage()
    {
        if (! $this->storage) {
            if (! $this->hasOption(self::OPTION_PERSISTENCE)) {
                throw new InconsistencyConfigException(__('Maintenance service must have a persistence option.'));
            }
            $this->storage = new MaintenanceStorage(
                \common_persistence_Manager::getPersistence($this->getOption(self::OPTION_PERSISTENCE))
            );
        }
        return $this->storage;
    }
563124
def get_data_store(args):
    """"""
    return tacl.DataStore(args.db, args.memory, args.ram)
1000278
def storage(self):
        
        annotation = self.get_annotation()
        if annotation.get(ATTACHMENTS_STORAGE) is None:
            annotation[ATTACHMENTS_STORAGE] = OOBTree()
        return annotation[ATTACHMENTS_STORAGE]
1293270
public function persist()
    {

        $this->ensureRootDirectory();

        $someoneSaved = false;
        foreach ($this->storages as $url=>$storage) {
            $this->ensureStorageDirectory($url);
            if ($storage->persist()) {
                $someoneSaved = true;
            }
        }

        foreach ($this->purgeQueue as $url) {
            $storage = $this->getOrCreateStorage($url);
            if ($storage->purge()) {
                $someoneSaved = true;
            }
            $this->removeStorageIfLoaded($url);
        }

        $this->purgeQueue = [];

        return $someoneSaved;
    }
1190952
def get_client(key, project):
    """"""
    cred = get_storage_credentials(key)
    return storage.Client(project=project, credentials=cred)
1249252
def get_storage(address)
      storage_root = get_account_item address, :storage
      SecureTrie.new PruningTrie.new(db, storage_root)
    end
286059
def get_persistent_boot_device(self):
        """"""
        result = self._get_persistent_boot()
        boot_mode = self._check_boot_mode(result)

        if boot_mode == 'bios':
            return result[0]['value']

        value = result[0]['DESCRIPTION']
        if 'HP iLO Virtual USB CD' in value:
            return 'CDROM'

        elif 'NIC' in value or 'PXE' in value:
            return 'NETWORK'

        elif common.isDisk(value):
            return 'HDD'

        else:
            return None
823313
function PersistInNode(n) {
        RED.nodes.createNode(this,n);
        var node = this;

        node.name = n.name;
        node.storageNode = RED.nodes.getNode(n.storageNode);

        node.on("input", function(msg) {
            node.storageNode.store(node.name, msg);
        });
    }
850395
def _get_persistent_mpe_dir(self):
        
        mpe_address      = self.get_mpe_address().lower()
        registry_address = self.get_registry_address().lower()
        return Path.home().joinpath(".snet", "mpe_client", "%s_%s"%(mpe_address, registry_address))
1169583
def storage_get(attribute=None, storage_id=None):
    """"""
    _args = ['storage-get', '--format=json']
    if storage_id:
        _args.extend(('-s', storage_id))
    if attribute:
        _args.append(attribute)
    try:
        return json.loads(subprocess.check_output(_args).decode('UTF-8'))
    except ValueError:
        return None
187938
def persist(self):
        """"""
        if self.object_hash:
            data = dill.dumps(self.object_property)
            f = ContentFile(data)
            self.object_file.save(self.object_hash, f, save=False)
            f.close()
            self._persisted = True
        return self._persisted