# & لا شيء

Canonical URL: https://developers.iagenify.com/ar/sdk/ref/connected-storage/files/
Language: ar

`storage.files → LocalFiles`

ملفات حاسوب خاصة على تلك الآلة لا شيء مُحمّل ليتم قراءته ولا شيء منه مُحتفظ به على الحساب

Status: a computer only · no bytes on the account · throws elsewhere

الكمبيوتر هو مخزن بياناته ملفاته، و يبقون حيث هم. هذه هي الفكرة الكاملة: وكيل يعمل على آلة يقرأ القرص الذي هو عليه، بدلا من نسخة منه.

```javascript
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");
```

تاريخ التوقيع على [محارف محلية](/ar/sdk/ref/local-files).

## حيث أن هذه الملفات هي {#where}

في مجال العمل على تلك الآلة تحت SDK's s s file in the user' home دليل المسارات التي تمررها هي نسبيّة إليه، و المسار لا يستطيع تركه.

> **ليست على الحساب، وهي ليست مدعومة**
>
> لا شيء من هذا يصل إلى الخادم - وهذا أيضاً السبب في ادخاره للحاسوب من خلال api.files إذا ذهبت الآلة، فها هم كذلك

## إنه يُلقي على أي شيء آخر {#throws}

| storage.type | ما تحصل عليه |
| --- | --- |
| أنت | محلّيّات. |
| (أ) لا توجد بيانات عن هذا البند. | storage_is_phone - ملفاته في ذلك المتصفح. |
| :: Name | storage_not_local - تشغيل )ك( |

وهناك رفضان مختلفان عن قصد: أحدهما يقول "النوع الخطأ من التخزين"، والآخر يقول "الفكرة الصحيحة، والمكان الخطأ لطلبه من".

```javascript
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;
  }
}
```

## انها ملفات هذه الالة ولا اي منها {#which}

> **الوصول لملفات حاسوب آخر من هنا قراءة هذا**
>
> يعمل المُدخل على العملية التي أنت فيها. إن حملك لسلسلة من الملفات الموصولة لآلة لا يعطيك نظام ملفات عن بعد -- تحقق من هوية الآلة مقابل الآلة التي تعمل عليها قبل التمثيل.

## ما يفعله العميل بهذا {#agent}

وكيل أعطى حاسوباً كما `machine` هذا بالضبط. ولهذا السبب يتم الترخيص بأدواتها لكل فئة بدلا من الملف: الحدود هي مساحة العمل، والقرار لك في كل خطوة.

- [محارف محلية](/ar/sdk/ref/local-files): كتابة كتابات: كتابة؛ كتابة؛ نقل؛ إزالة.
- [الملفات](/ar/sdk/agent/bridges/files): إعطاء ملفات عميلة في مكان آخر - هاتف، متصفح.

```python
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")
```

```python
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
```
