marqdo

fsok

stdlib/fs.mq.md

Structure

importfs:lib/fs.mq.md
fn · h1main
comment

Filesystem helpers from lib/fs. Bare path words must not contain / (division). Prefer a same-folder name or a variable.

bind `ok` = [fs.exists] path=demo.txt
branch
arm`ok`
call> 打印 内容=demo-present
armelse
call> 打印 内容=demo-missing
Functions
Variables
  • ok bool
    False

Execution

demo-missing

Source

---
title: lib/fs — files
description: Read and write text under the sandbox
import fs:lib/fs.mq.md
---

# main

Filesystem helpers from lib/fs. Bare path words must not contain `/` (division). Prefer a same-folder name or a variable.

**`ok` = [fs.exists] path="demo.txt"**

1. `ok`
  **打印 内容="demo-present"**
2. *
  **打印 内容="demo-missing"**

Variable