api.storage

get()

api.storage.get({ id }) → Promise<ConnectedStorage | null>

واحد تخزين، جاهز للاستخدام بدون جدال الحساب افتراضي

GET /api/storage/:idfreenull, never a throw
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

المعاملات

idstring

أي مخزن، اتركه خارج الحساب من أجل الحساب

const target = await api.storage.get();            // the default
const one = await api.storage.get({ id });         // a particular one
target = api.storage.get()                # the default
one = api.storage.get(id=storage_id)      # a particular one

إنها تجيب على ما لا يليه من القذف

هوية غير معروفة، أو هوية مشوهة، أو هوية أخرى، كل ما يقدم nullاذاً الشيك هو اختبار قيمة، وليس محاولة/catch - null "إنه من شخص آخر.

const storage = await api.storage.get({ id });

if (!storage) {
  throw new Error("that storage is not on this account");
}
storage = api.storage.get(id=storage_id)

if storage is None:
    raise LookupError("that storage is not on this account")

هذا أو يحصل على Sto hab()

api.storage.get()api.getStorage()
منحA متصلStore مع مع4
استخدمه لـقراءة، كتابة، قائمة ملفاتاي واحد هو
أخذ هويةنعملا - دائماً ما يكون

ما يمكنك فعله مع ما يعود

const storage = await api.storage.get({ id });

// Any storage: read and write through run()
await storage.run({ action: "collections" });

// A computer only: its own files, on that machine
const pc = await api.storage.get({ id: computerId });
await pc.files.list();
storage = api.storage.get(id=storage_id)

# Any storage: read and write through run()
storage.run(action="collections")

# A computer only: its own files, on that machine
pc = api.storage.get(id=computer_id)
pc.files.list()
والملفات والمحطات الطرفية الموجودة فقط على حاسوب

« يصل إليهم في أي شيء آخر » أي أي شيء آخر من رمي ، أي : أي : : storage_not_localوعلى هاتف storage_is_phone - ملفاته في متصفحه - نوع الاختبار قبل أن تصل

if (storage.type === "filesystem") {
  await storage.files.list();
} else {
  await storage.run({ action: "objects" });
}
if storage.type == "filesystem":
    storage.files.list()
else:
    storage.run(action="objects")

ما الذي يحمله

الحقلمحرف
رمز بطاقةالهوية، واسم العرض.
نوع□ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □
مقدم الخدماتما وراءه، ومن الذي يعمله.
خدمة- غرض على: IaGenify - تخزين؛
هو افتراضIF a مع لا هدف يعمل هنا.
اسم المضيفعلى جهاز: أي منهما.

لا شيء هنا يحمل شهادة اعتماد: ما زودته بالإتصال يستخدم بواسطة الخادم ولا يُسلم.