random-access-chrome-file

WebJar for random-access-chrome-file

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

random-access-chrome-file
Последняя версия

Последняя версия

1.1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

random-access-chrome-file
WebJar for random-access-chrome-file
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/random-access-storage/random-access-chrome-file

Скачать random-access-chrome-file

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/random-access-chrome-file/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>random-access-chrome-file</artifactId>
    <version>1.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/random-access-chrome-file/
implementation 'org.webjars.npm:random-access-chrome-file:1.1.3'
// https://jarcasting.com/artifacts/org.webjars.npm/random-access-chrome-file/
implementation ("org.webjars.npm:random-access-chrome-file:1.1.3")
'org.webjars.npm:random-access-chrome-file:jar:1.1.3'
<dependency org="org.webjars.npm" name="random-access-chrome-file" rev="1.1.3">
  <artifact name="random-access-chrome-file" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='random-access-chrome-file', version='1.1.3')
)
libraryDependencies += "org.webjars.npm" % "random-access-chrome-file" % "1.1.3"
[org.webjars.npm/random-access-chrome-file "1.1.3"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : random-access-storage jar [1.3.0,2)

Модули Проекта

Данный проект не имеет модулей.

random-access-chrome-file

A random-access-storage instance backed by the Chrome file system api

npm install random-access-chrome-file

Usage

// Currently only works in Chrome

const createFile = require('random-access-chrome-file')

const file = createFile('test.txt')

file.write(0, Buffer.from('hello world'), function (err) {
  if (err) throw err
  file.read(0, 11, function (err, buf) {
    if (err) throw err
    console.log(buf.toString())
  })
})

API

file = createFile(name, [options])

Returns a random-access-storage instance that supports the full API.

Options include:

{
  maxSize: Number.MAX_SAFE_INTEGER
}

maxSize is the storage quota it asks the browser for. If you are making an extension you can set the unlimitedStorage to get all the storage you want. Otherwise tweak the maxSize option to fit your needs.

If you want to change the maxSize default for all instances change createFile.DEFAULT_MAX_SIZE.

createFile.requestQuota(maxSize, cb)

Manually request the maxSize quota without creating af file.

License

MIT

org.webjars.npm
Random Access Storage projects and community

Версии библиотеки

Версия
1.1.3