Class MockFileSystem

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class MockFileSystem
    extends java.nio.file.FileSystem
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name  
      private java.util.concurrent.atomic.AtomicBoolean open  
    • Constructor Summary

      Constructors 
      Constructor Description
      MockFileSystem​(java.lang.String name)  
    • Field Detail

      • open

        private final java.util.concurrent.atomic.AtomicBoolean open
      • name

        private final java.lang.String name
    • Constructor Detail

      • MockFileSystem

        public MockFileSystem​(java.lang.String name)
    • Method Detail

      • provider

        public java.nio.file.spi.FileSystemProvider provider()
        Specified by:
        provider in class java.nio.file.FileSystem
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in class java.nio.file.FileSystem
        Throws:
        java.io.IOException
      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in class java.nio.file.FileSystem
      • isReadOnly

        public boolean isReadOnly()
        Specified by:
        isReadOnly in class java.nio.file.FileSystem
      • getSeparator

        public java.lang.String getSeparator()
        Specified by:
        getSeparator in class java.nio.file.FileSystem
      • getRootDirectories

        public java.lang.Iterable<java.nio.file.Path> getRootDirectories()
        Specified by:
        getRootDirectories in class java.nio.file.FileSystem
      • getFileStores

        public java.lang.Iterable<java.nio.file.FileStore> getFileStores()
        Specified by:
        getFileStores in class java.nio.file.FileSystem
      • supportedFileAttributeViews

        public java.util.Set<java.lang.String> supportedFileAttributeViews()
        Specified by:
        supportedFileAttributeViews in class java.nio.file.FileSystem
      • getPath

        public java.nio.file.Path getPath​(java.lang.String first,
                                          java.lang.String... more)
        Specified by:
        getPath in class java.nio.file.FileSystem
      • getPathMatcher

        public java.nio.file.PathMatcher getPathMatcher​(java.lang.String syntaxAndPattern)
        Specified by:
        getPathMatcher in class java.nio.file.FileSystem
      • getUserPrincipalLookupService

        public java.nio.file.attribute.UserPrincipalLookupService getUserPrincipalLookupService()
        Specified by:
        getUserPrincipalLookupService in class java.nio.file.FileSystem
      • newWatchService

        public java.nio.file.WatchService newWatchService()
                                                   throws java.io.IOException
        Specified by:
        newWatchService in class java.nio.file.FileSystem
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object