Skip to content

Create file children through opaque directory grants #400

Description

@wieslawsoltes

Scope

Implement FileSystemDirectoryHandle.getFileHandle(name, {create:true}) over the typed opaque child authority tracked by SceneTech/AppScene#162.

Browser behavior follows the pinned WPT contract:

  • create and return an empty file when the named child is absent;
  • return an existing file without truncating it;
  • reject a directory collision with TypeMismatchError;
  • preserve WebIDL option conversion and existing invalid-name TypeError behavior;
  • map denied, stale, cancelled, capacity, and I/O outcomes to browser errors without exposing raw paths or native objects;
  • bind every derived handle to the requesting origin/profile/partition and release its native grant exactly once across realm/navigation retirement.

Acceptance

  • pinned WPT and Chrome oracle for create, existing-content preservation, collision, invalid-name, and error mapping;
  • native adapter/ABI/export/C11 parity with AppScene#162;
  • cross-origin/profile/partition rejection plus cancel/stale-generation/retire coverage;
  • 10k bounded broker operations and 100 lifecycle cycles with heap/RSS/FD bounds;
  • unchanged VS Code browser provider file-create/write path through getFileHandle(...,{create:true}) plus createWritable().

This issue excludes directory creation, removeEntry()/remove(), move/rename, recursive deletion, and package paths tracked by #131/#252.

Parent: #248.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vscode-oss/plannedPlanned for the AppScene/WebScene VS Code OSS integration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions