summaryrefslogtreecommitdiffstats
path: root/components/filesystem/public/interfaces/file_system.mojom
blob: 72785636ddaf92159f1375431f8eedd8916ad1b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module filesystem;

import "components/filesystem/public/interfaces/directory.mojom";
import "components/filesystem/public/interfaces/types.mojom";

// Callback interface for FileSystem. When we call OpenFileSystem, we supply a
// client to receive and handle the shutdown signal. Just because the shell has
// closed the application connection to the FileSystem doesn't mean that we
// should immediately kill all connections to our clients. We notify them that
// we are shutting down so that they can flush any data and cleanly shutdown.
//
// Actual connection lifetime is controlled by the lifetime of the |directory|
// object.
interface FileSystemClient {
  OnFileSystemShutdown();
};

interface FileSystem {
  // Opens the root directory for the file system with the given name; null
  // yields the default file system, if any.
  OpenFileSystem(string? file_system, Directory& directory,
                 FileSystemClient client) => (FileError error);
};