vfs/directory/immutable/
simple.rs

1// Copyright 2019 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5//! This is an implementation of an immutable "simple" pseudo directories.  Use [`simple()`] to
6//! construct actual instances.  See [`Simple`] for details.
7
8#[cfg(test)]
9mod tests;
10
11use std::sync::Arc;
12
13pub use crate::directory::simple::Simple;
14
15/// Creates an immutable empty "simple" directory.  This directory holds a "static" set of entries,
16/// allowing the server to add or remove entries via the
17/// [`crate::directory::helper::DirectlyMutable::add_entry()`] and
18/// [`crate::directory::helper::DirectlyMutable::remove_entry()`] methods.
19pub fn simple() -> Arc<Simple> {
20    Simple::new()
21}