file_system_types.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // Copyright (c) 2012 The Chromium 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. #ifndef STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_
  5. #define STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_
  6. #include "third_party/blink/public/platform/web_file_system_type.h"
  7. namespace storage {
  8. enum FileSystemType {
  9. // Indicates uninitialized or invalid filesystem type.
  10. kFileSystemTypeUnknown = -1,
  11. // ------------------------------------------------------------------------
  12. // Public FileSystem types, that are embedded in filesystem: URL and exposed
  13. // to WebKit/renderer. Both Chrome and WebKit know how to handle these types.
  14. // Following two types are for TEMPORARY or PERSISTENT filesystems that
  15. // can be used by webapps via standard app-facing API
  16. // as defined in File API: Directories and System.
  17. // http://www.w3.org/TR/file-system-api/#temporary-vs.-persistent-storage
  18. // They are sandboxed filesystems; all the files in the filesystems are
  19. // placed under the profile directory with path obfuscation and quota
  20. // enforcement.
  21. kFileSystemTypeTemporary = blink::kWebFileSystemTypeTemporary,
  22. kFileSystemTypePersistent = blink::kWebFileSystemTypePersistent,
  23. // Indicates non-sandboxed isolated filesystem.
  24. kFileSystemTypeIsolated = blink::kWebFileSystemTypeIsolated,
  25. // Indicates filesystems that are mounted externally via
  26. // ExternalMountPoints with a well-known mount name. The mounted
  27. // filesystems can be sandboxed or non-sandboxed. (E.g. Chrome OS mounts
  28. // non-sandboxed removable media folder with a name 'removable', while
  29. // chrome.syncFileSystem mounts a sandboxed filesystem with a name
  30. // 'syncfs'.)
  31. kFileSystemTypeExternal = blink::kWebFileSystemTypeExternal,
  32. // ------------------------------------------------------------------------
  33. // Marks the beginning of internal type enum. (This is not the actual fs type)
  34. kFileSystemInternalTypeEnumStart = 99,
  35. // Private FileSystem types, that should not appear in filesystem: URL as
  36. // WebKit has no idea how to handle those types.
  37. //
  38. // One can register (mount) a new file system with a private file system type
  39. // using IsolatedContext. Files in such file systems can be accessed via
  40. // either Isolated or External public file system types (depending on
  41. // how the file system is registered).
  42. // See the comments for IsolatedContext and/or FileSystemURL for more details.
  43. // Should be used only for testing.
  44. kFileSystemTypeTest,
  45. // Indicates a local filesystem where we can access files using local path.
  46. kFileSystemTypeLocal,
  47. // Indicates a local filesystem where we can access files using local path,
  48. // but with restricted access.
  49. // Restricted local file system is in read-only mode.
  50. kFileSystemTypeRestrictedLocal,
  51. // Indicates a transient, isolated file system for dragged files (which could
  52. // contain multiple dragged paths in the virtual root).
  53. kFileSystemTypeDragged,
  54. // Indicates media filesystem which we can access with same manner to
  55. // regular filesystem.
  56. kFileSystemTypeLocalMedia,
  57. // Indicates media filesystem to which we need special protocol to access,
  58. // such as MTP or PTP.
  59. kFileSystemTypeDeviceMedia,
  60. // Indicates a Syncable sandboxed filesystem which can be backed by a
  61. // cloud storage service.
  62. kFileSystemTypeSyncable,
  63. // Indicates a special filesystem type for internal file sync operation
  64. // for Syncable sandboxed filesystems. The file system is overlayed, i.e.
  65. // points to the same sandboxed filesystem as that of kFileSystemTypeSyncable,
  66. // but the changes made with this filesystem type are not recorded for
  67. // further sync.
  68. kFileSystemTypeSyncableForInternalSync,
  69. // Indicates an external filesystem accessible by file paths from platform
  70. // Apps. As of writing, on non Chrome OS platform, this is merely a
  71. // kFileSystemTypeLocal. On Chrome OS, the path is parsed by
  72. // the handlers of kFileSystemTypeExternal.
  73. kFileSystemTypeLocalForPlatformApp,
  74. // Indicates an isolated filesystem which is supposed to contain one
  75. // temporary which is supposed to go away when the last reference of
  76. // its snapshot is dropped.
  77. // This type is useful for creating a blob reference for a temporary
  78. // file which must go away when the blob's last reference is dropped.
  79. kFileSystemTypeForTransientFile,
  80. // A filesystem that is mounted via the FileSystemProvider API.
  81. kFileSystemTypeProvided,
  82. // A media filesystem such as MTP or PTP, mounted as a file storage not
  83. // limited to media files.
  84. kFileSystemTypeDeviceMediaAsFileStorage,
  85. // A filesystem to provide access to contents managed by ARC.
  86. kFileSystemTypeArcContent,
  87. // A filesystem to provide access to documents providers in ARC.
  88. kFileSystemTypeArcDocumentsProvider,
  89. // Indicates a DriveFS filesystem which provides access to Google Drive.
  90. kFileSystemTypeDriveFs,
  91. // Indicates an SmbFs filesystem which provides access to SMB file shares.
  92. kFileSystemTypeSmbFs,
  93. // Indicates a FUSE filesystem which provides access to virtual files.
  94. kFileSystemTypeFuseBox,
  95. kFileSystemTypeLast = kFileSystemTypeFuseBox,
  96. // --------------------------------------------------------------------
  97. // Marks the end of internal type enum. (This is not the actual fs type)
  98. // New internal filesystem types must be added above this line.
  99. kFileSystemInternalTypeEnumEnd,
  100. };
  101. } // namespace storage
  102. #endif // STORAGE_COMMON_FILE_SYSTEM_FILE_SYSTEM_TYPES_H_