onCreateDirectoryRequested property

EventStream<OnCreateDirectoryRequestedEvent> get onCreateDirectoryRequested

Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory already exists. If recursive is true, then all of the missing directories on the directory path must be created.

Implementation

EventStream<OnCreateDirectoryRequestedEvent> get onCreateDirectoryRequested =>
    $js.chrome.fileSystemProvider.onCreateDirectoryRequested
        .asStream(($c) => (
              $js.CreateDirectoryRequestedOptions options,
              $js.ProviderSuccessCallback successCallback,
              $js.ProviderErrorCallback errorCallback,
            ) {
              return $c(OnCreateDirectoryRequestedEvent(
                options: CreateDirectoryRequestedOptions.fromJS(options),
                successCallback: () {
                  //ignore: avoid_dynamic_calls
                  (successCallback as Function)();
                },
                errorCallback: (ProviderError error) {
                  //ignore: avoid_dynamic_calls
                  (errorCallback as Function)(error.toJS);
                },
              ));
            }.toJS);