### Method

# WebKit2 WebContext add_path_to_sandbox

since: 2.26

#### Declaration [src]

    void
    webkit_web_context_add_path_to_sandbox (
      WebKitWebContext* context,
      const char* path,
      gboolean read_only
    )

#### Description [src]

Adds a path to be mounted in the sandbox.

`path` must exist before any web process has been created. It is a fatal error to add paths after a web process has been spawned.

Paths under `/sys`, `/proc`, and `/dev` are invalid. Attempting to add all of `/` is not valid. Since 2.40, adding the user’s entire home directory or /home is also not valid.

See also webkit_web_context_set_sandbox_enabled().

Available since: 2.26

#### Parameters

`path`

  Type: `const char*`

  An absolute path to mount in the sandbox.

  The data is owned by the caller of the method.
  The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

`read_only`

  Type: `gboolean`

  If `TRUE` the path will be read-only.