الكمبيوتر هو مخزن بياناته ملفاته، و يبقون حيث هم. هذه هي الفكرة الكاملة: وكيل يعمل على آلة يقرأ القرص الذي هو عليه، بدلا من نسخة منه.
const pc = await api.storage.get({ id: machineId });
await pc.files.list(); // what is in the workspace
await pc.files.write("notes/today.md", "…"); // write
await pc.files.read("notes/today.md"); // read back
await pc.files.mkdir("notes/archive");
await pc.files.move("notes/today.md", "notes/archive/today.md");
await pc.files.remove("notes/archive/today.md");pc = api.storage.get(id=machine_id)
pc.files.list() # what is in the workspace
pc.files.write("notes/today.md", "…") # write
pc.files.read("notes/today.md") # read back
pc.files.mkdir("notes/archive")
pc.files.move("notes/today.md", "notes/archive/today.md")
pc.files.remove("notes/archive/today.md")تاريخ التوقيع على محارف محلية.
حيث أن هذه الملفات هي
في مجال العمل على تلك الآلة تحت SDK's s s file in the user' home دليل المسارات التي تمررها هي نسبيّة إليه، و المسار لا يستطيع تركه.
لا شيء من هذا يصل إلى الخادم - وهذا أيضاً السبب في ادخاره للحاسوب من خلال api.files إذا ذهبت الآلة، فها هم كذلك
إنه يُلقي على أي شيء آخر
| storage.type | ما تحصل عليه |
|---|---|
| أنت | محلّيّات. |
| (أ) لا توجد بيانات عن هذا البند. | storage_is_phone - ملفاته في ذلك المتصفح. |
| :: Name | storage_not_local - تشغيل )ك( |
وهناك رفضان مختلفان عن قصد: أحدهما يقول "النوع الخطأ من التخزين"، والآخر يقول "الفكرة الصحيحة، والمكان الخطأ لطلبه من".
import { IaGenifyError } from "iagenify";
function filesOf(storage) {
try {
return storage.files;
} catch (err) {
if (err instanceof IaGenifyError && err.code === "storage_is_phone") {
return null; // reachable through the page, not from here
}
if (err instanceof IaGenifyError && err.code === "storage_not_local") {
return null; // its data is read through run()
}
throw err;
}
}def files_of(storage):
# None on a phone (reachable through the page, not from here)
# and on any storage that is not a computer (its data is read through run()).
return storage.filesانها ملفات هذه الالة ولا اي منها
يعمل المُدخل على العملية التي أنت فيها. إن حملك لسلسلة من الملفات الموصولة لآلة لا يعطيك نظام ملفات عن بعد -- تحقق من هوية الآلة مقابل الآلة التي تعمل عليها قبل التمثيل.
ما يفعله العميل بهذا
وكيل أعطى حاسوباً كما machine هذا بالضبط. ولهذا السبب يتم الترخيص بأدواتها لكل فئة بدلا من الملف: الحدود هي مساحة العمل، والقرار لك في كل خطوة.