View Javadoc
1   /*
2    * Copyright 2016-2022 The OSHI Project Contributors
3    * SPDX-License-Identifier: MIT
4    */
5   package oshi.software.common;
6   
7   import java.util.Arrays;
8   import java.util.List;
9   
10  import oshi.annotation.concurrent.ThreadSafe;
11  import oshi.software.os.FileSystem;
12  import oshi.software.os.OSFileStore;
13  import oshi.util.GlobalConfig;
14  
15  /**
16   * Common methods for filesystem implementations
17   */
18  @ThreadSafe
19  public abstract class AbstractFileSystem implements FileSystem {
20  
21      /**
22       * FileSystem types which are network-based and should be excluded from local-only lists
23       */
24      protected static final List<String> NETWORK_FS_TYPES = Arrays
25              .asList(GlobalConfig.get(GlobalConfig.OSHI_NETWORK_FILESYSTEM_TYPES, "").split(","));
26  
27      protected static final List<String> PSEUDO_FS_TYPES = Arrays
28              .asList(GlobalConfig.get(GlobalConfig.OSHI_PSEUDO_FILESYSTEM_TYPES, "").split(","));
29  
30      @Override
31      public List<OSFileStore> getFileStores() {
32          return getFileStores(false);
33      }
34  }