FileSystemObserver: disconnect() method

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{securecontext_header}}{{APIRef("File System API")}}{{SeeCompatTable}}{{non-standard_header}}

The **disconnect()** method of the {{domxref("FileSystemObserver")}} interface stops the observer observing the file system.

Syntax

js-nolint
disconnect()

Parameters

None.

Return value

None ({{jsxref('undefined')}}).

Examples

Stop observing the file system

Assuming a FileSystemObserver instance is available, you can call the disconnect() method on it when you want to stop observing changes to the file system entry:

js
observer.disconnect();

Specifications

Not currently part of a specification. See https://github.com/whatwg/fs/pull/165 for the relevant specification PR.

Browser compatibility

{{Compat}}

See also

  • File System API
  • The File System Observer API origin trial on developer.chrome.com (2024)