Class FileSystemMock

java.lang.Object
com.codingchili.core.testing.FileSystemMock
All Implemented Interfaces:
io.vertx.core.file.FileSystem

public class FileSystemMock extends Object implements io.vertx.core.file.FileSystem
Mock filesystem: turns asynchronous reads into sync reads to avoid dealing with asynchronous setup in test cases.
  • Constructor Details

    • FileSystemMock

      public FileSystemMock(io.vertx.core.Vertx vertx)
  • Method Details

    • copy

      public io.vertx.core.file.FileSystem copy(String from, String to, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      copy in interface io.vertx.core.file.FileSystem
    • copy

      public io.vertx.core.Future<Void> copy(String from, String to)
      Specified by:
      copy in interface io.vertx.core.file.FileSystem
    • copy

      public io.vertx.core.file.FileSystem copy(String from, String to, io.vertx.core.file.CopyOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      copy in interface io.vertx.core.file.FileSystem
    • copy

      public io.vertx.core.Future<Void> copy(String from, String to, io.vertx.core.file.CopyOptions options)
      Specified by:
      copy in interface io.vertx.core.file.FileSystem
    • copyBlocking

      public io.vertx.core.file.FileSystem copyBlocking(String from, String to)
      Specified by:
      copyBlocking in interface io.vertx.core.file.FileSystem
    • copyRecursive

      public io.vertx.core.file.FileSystem copyRecursive(String from, String to, boolean recursive, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      copyRecursive in interface io.vertx.core.file.FileSystem
    • copyRecursive

      public io.vertx.core.Future<Void> copyRecursive(String from, String to, boolean recursive)
      Specified by:
      copyRecursive in interface io.vertx.core.file.FileSystem
    • copyRecursiveBlocking

      public io.vertx.core.file.FileSystem copyRecursiveBlocking(String from, String to, boolean recursive)
      Specified by:
      copyRecursiveBlocking in interface io.vertx.core.file.FileSystem
    • move

      public io.vertx.core.file.FileSystem move(String from, String to, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      move in interface io.vertx.core.file.FileSystem
    • move

      public io.vertx.core.Future<Void> move(String from, String to)
      Specified by:
      move in interface io.vertx.core.file.FileSystem
    • move

      public io.vertx.core.file.FileSystem move(String from, String to, io.vertx.core.file.CopyOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      move in interface io.vertx.core.file.FileSystem
    • move

      public io.vertx.core.Future<Void> move(String from, String to, io.vertx.core.file.CopyOptions options)
      Specified by:
      move in interface io.vertx.core.file.FileSystem
    • moveBlocking

      public io.vertx.core.file.FileSystem moveBlocking(String from, String to)
      Specified by:
      moveBlocking in interface io.vertx.core.file.FileSystem
    • truncate

      public io.vertx.core.file.FileSystem truncate(String path, long len, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      truncate in interface io.vertx.core.file.FileSystem
    • truncate

      public io.vertx.core.Future<Void> truncate(String path, long len)
      Specified by:
      truncate in interface io.vertx.core.file.FileSystem
    • truncateBlocking

      public io.vertx.core.file.FileSystem truncateBlocking(String path, long len)
      Specified by:
      truncateBlocking in interface io.vertx.core.file.FileSystem
    • chmod

      public io.vertx.core.file.FileSystem chmod(String path, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      chmod in interface io.vertx.core.file.FileSystem
    • chmod

      public io.vertx.core.Future<Void> chmod(String path, String perms)
      Specified by:
      chmod in interface io.vertx.core.file.FileSystem
    • chmodBlocking

      public io.vertx.core.file.FileSystem chmodBlocking(String path, String perms)
      Specified by:
      chmodBlocking in interface io.vertx.core.file.FileSystem
    • chmodRecursive

      public io.vertx.core.file.FileSystem chmodRecursive(String path, String perms, String dirPerms, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      chmodRecursive in interface io.vertx.core.file.FileSystem
    • chmodRecursive

      public io.vertx.core.Future<Void> chmodRecursive(String path, String perms, String dirPerms)
      Specified by:
      chmodRecursive in interface io.vertx.core.file.FileSystem
    • chmodRecursiveBlocking

      public io.vertx.core.file.FileSystem chmodRecursiveBlocking(String path, String perms, String dirPerms)
      Specified by:
      chmodRecursiveBlocking in interface io.vertx.core.file.FileSystem
    • chown

      public io.vertx.core.file.FileSystem chown(String path, String user, String group, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      chown in interface io.vertx.core.file.FileSystem
    • chown

      public io.vertx.core.Future<Void> chown(String path, String user, String group)
      Specified by:
      chown in interface io.vertx.core.file.FileSystem
    • chownBlocking

      public io.vertx.core.file.FileSystem chownBlocking(String path, String user, String group)
      Specified by:
      chownBlocking in interface io.vertx.core.file.FileSystem
    • props

      public io.vertx.core.file.FileSystem props(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.file.FileProps>> handler)
      Specified by:
      props in interface io.vertx.core.file.FileSystem
    • props

      public io.vertx.core.Future<io.vertx.core.file.FileProps> props(String path)
      Specified by:
      props in interface io.vertx.core.file.FileSystem
    • propsBlocking

      public io.vertx.core.file.FileProps propsBlocking(String path)
      Specified by:
      propsBlocking in interface io.vertx.core.file.FileSystem
    • lprops

      public io.vertx.core.file.FileSystem lprops(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.file.FileProps>> handler)
      Specified by:
      lprops in interface io.vertx.core.file.FileSystem
    • lprops

      public io.vertx.core.Future<io.vertx.core.file.FileProps> lprops(String path)
      Specified by:
      lprops in interface io.vertx.core.file.FileSystem
    • lpropsBlocking

      public io.vertx.core.file.FileProps lpropsBlocking(String path)
      Specified by:
      lpropsBlocking in interface io.vertx.core.file.FileSystem
    • link

      public io.vertx.core.file.FileSystem link(String link, String existing, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      link in interface io.vertx.core.file.FileSystem
    • link

      public io.vertx.core.Future<Void> link(String link, String existing)
      Specified by:
      link in interface io.vertx.core.file.FileSystem
    • linkBlocking

      public io.vertx.core.file.FileSystem linkBlocking(String link, String existing)
      Specified by:
      linkBlocking in interface io.vertx.core.file.FileSystem
    • symlink

      public io.vertx.core.file.FileSystem symlink(String link, String existing, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      symlink in interface io.vertx.core.file.FileSystem
    • symlink

      public io.vertx.core.Future<Void> symlink(String link, String existing)
      Specified by:
      symlink in interface io.vertx.core.file.FileSystem
    • symlinkBlocking

      public io.vertx.core.file.FileSystem symlinkBlocking(String link, String existing)
      Specified by:
      symlinkBlocking in interface io.vertx.core.file.FileSystem
    • unlink

      public io.vertx.core.file.FileSystem unlink(String link, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      unlink in interface io.vertx.core.file.FileSystem
    • unlink

      public io.vertx.core.Future<Void> unlink(String link)
      Specified by:
      unlink in interface io.vertx.core.file.FileSystem
    • unlinkBlocking

      public io.vertx.core.file.FileSystem unlinkBlocking(String link)
      Specified by:
      unlinkBlocking in interface io.vertx.core.file.FileSystem
    • readSymlink

      public io.vertx.core.file.FileSystem readSymlink(String link, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      readSymlink in interface io.vertx.core.file.FileSystem
    • readSymlink

      public io.vertx.core.Future<String> readSymlink(String link)
      Specified by:
      readSymlink in interface io.vertx.core.file.FileSystem
    • readSymlinkBlocking

      public String readSymlinkBlocking(String link)
      Specified by:
      readSymlinkBlocking in interface io.vertx.core.file.FileSystem
    • delete

      public io.vertx.core.file.FileSystem delete(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      delete in interface io.vertx.core.file.FileSystem
    • delete

      public io.vertx.core.Future<Void> delete(String path)
      Specified by:
      delete in interface io.vertx.core.file.FileSystem
    • deleteBlocking

      public io.vertx.core.file.FileSystem deleteBlocking(String path)
      Specified by:
      deleteBlocking in interface io.vertx.core.file.FileSystem
    • deleteRecursive

      public io.vertx.core.file.FileSystem deleteRecursive(String path, boolean recursive, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      deleteRecursive in interface io.vertx.core.file.FileSystem
    • deleteRecursive

      public io.vertx.core.Future<Void> deleteRecursive(String path, boolean recursive)
      Specified by:
      deleteRecursive in interface io.vertx.core.file.FileSystem
    • deleteRecursiveBlocking

      public io.vertx.core.file.FileSystem deleteRecursiveBlocking(String path, boolean recursive)
      Specified by:
      deleteRecursiveBlocking in interface io.vertx.core.file.FileSystem
    • mkdir

      public io.vertx.core.file.FileSystem mkdir(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      mkdir in interface io.vertx.core.file.FileSystem
    • mkdir

      public io.vertx.core.Future<Void> mkdir(String path)
      Specified by:
      mkdir in interface io.vertx.core.file.FileSystem
    • mkdirBlocking

      public io.vertx.core.file.FileSystem mkdirBlocking(String path)
      Specified by:
      mkdirBlocking in interface io.vertx.core.file.FileSystem
    • mkdir

      public io.vertx.core.file.FileSystem mkdir(String path, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      mkdir in interface io.vertx.core.file.FileSystem
    • mkdir

      public io.vertx.core.Future<Void> mkdir(String path, String perms)
      Specified by:
      mkdir in interface io.vertx.core.file.FileSystem
    • mkdirBlocking

      public io.vertx.core.file.FileSystem mkdirBlocking(String path, String perms)
      Specified by:
      mkdirBlocking in interface io.vertx.core.file.FileSystem
    • mkdirs

      public io.vertx.core.file.FileSystem mkdirs(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      mkdirs in interface io.vertx.core.file.FileSystem
    • mkdirs

      public io.vertx.core.Future<Void> mkdirs(String path)
      Specified by:
      mkdirs in interface io.vertx.core.file.FileSystem
    • mkdirsBlocking

      public io.vertx.core.file.FileSystem mkdirsBlocking(String path)
      Specified by:
      mkdirsBlocking in interface io.vertx.core.file.FileSystem
    • mkdirs

      public io.vertx.core.file.FileSystem mkdirs(String path, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      mkdirs in interface io.vertx.core.file.FileSystem
    • mkdirs

      public io.vertx.core.Future<Void> mkdirs(String path, String perms)
      Specified by:
      mkdirs in interface io.vertx.core.file.FileSystem
    • mkdirsBlocking

      public io.vertx.core.file.FileSystem mkdirsBlocking(String path, String perms)
      Specified by:
      mkdirsBlocking in interface io.vertx.core.file.FileSystem
    • readDir

      public io.vertx.core.file.FileSystem readDir(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<String>>> handler)
      Specified by:
      readDir in interface io.vertx.core.file.FileSystem
    • readDir

      public io.vertx.core.Future<List<String>> readDir(String path)
      Specified by:
      readDir in interface io.vertx.core.file.FileSystem
    • readDirBlocking

      public List<String> readDirBlocking(String path)
      Specified by:
      readDirBlocking in interface io.vertx.core.file.FileSystem
    • readDir

      public io.vertx.core.file.FileSystem readDir(String path, String filter, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<String>>> handler)
      Specified by:
      readDir in interface io.vertx.core.file.FileSystem
    • readDir

      public io.vertx.core.Future<List<String>> readDir(String path, String filter)
      Specified by:
      readDir in interface io.vertx.core.file.FileSystem
    • readDirBlocking

      public List<String> readDirBlocking(String path, String filter)
      Specified by:
      readDirBlocking in interface io.vertx.core.file.FileSystem
    • readFile

      public io.vertx.core.file.FileSystem readFile(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.buffer.Buffer>> handler)
      Specified by:
      readFile in interface io.vertx.core.file.FileSystem
    • readFile

      public io.vertx.core.Future<io.vertx.core.buffer.Buffer> readFile(String path)
      Specified by:
      readFile in interface io.vertx.core.file.FileSystem
    • readFileBlocking

      public io.vertx.core.buffer.Buffer readFileBlocking(String path)
      Specified by:
      readFileBlocking in interface io.vertx.core.file.FileSystem
    • writeFile

      public io.vertx.core.file.FileSystem writeFile(String path, io.vertx.core.buffer.Buffer data, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      writeFile in interface io.vertx.core.file.FileSystem
    • writeFile

      public io.vertx.core.Future<Void> writeFile(String path, io.vertx.core.buffer.Buffer data)
      Specified by:
      writeFile in interface io.vertx.core.file.FileSystem
    • writeFileBlocking

      public io.vertx.core.file.FileSystem writeFileBlocking(String path, io.vertx.core.buffer.Buffer data)
      Specified by:
      writeFileBlocking in interface io.vertx.core.file.FileSystem
    • open

      public io.vertx.core.file.FileSystem open(String path, io.vertx.core.file.OpenOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.file.AsyncFile>> handler)
      Specified by:
      open in interface io.vertx.core.file.FileSystem
    • open

      public io.vertx.core.Future<io.vertx.core.file.AsyncFile> open(String path, io.vertx.core.file.OpenOptions options)
      Specified by:
      open in interface io.vertx.core.file.FileSystem
    • openBlocking

      public io.vertx.core.file.AsyncFile openBlocking(String path, io.vertx.core.file.OpenOptions options)
      Specified by:
      openBlocking in interface io.vertx.core.file.FileSystem
    • createFile

      public io.vertx.core.file.FileSystem createFile(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      createFile in interface io.vertx.core.file.FileSystem
    • createFile

      public io.vertx.core.Future<Void> createFile(String path)
      Specified by:
      createFile in interface io.vertx.core.file.FileSystem
    • createFileBlocking

      public io.vertx.core.file.FileSystem createFileBlocking(String path)
      Specified by:
      createFileBlocking in interface io.vertx.core.file.FileSystem
    • createFile

      public io.vertx.core.file.FileSystem createFile(String path, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Specified by:
      createFile in interface io.vertx.core.file.FileSystem
    • createFile

      public io.vertx.core.Future<Void> createFile(String path, String perms)
      Specified by:
      createFile in interface io.vertx.core.file.FileSystem
    • createFileBlocking

      public io.vertx.core.file.FileSystem createFileBlocking(String path, String perms)
      Specified by:
      createFileBlocking in interface io.vertx.core.file.FileSystem
    • exists

      public io.vertx.core.file.FileSystem exists(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)
      Specified by:
      exists in interface io.vertx.core.file.FileSystem
    • exists

      public io.vertx.core.Future<Boolean> exists(String path)
      Specified by:
      exists in interface io.vertx.core.file.FileSystem
    • existsBlocking

      public boolean existsBlocking(String path)
      Specified by:
      existsBlocking in interface io.vertx.core.file.FileSystem
    • fsProps

      public io.vertx.core.file.FileSystem fsProps(String path, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.core.file.FileSystemProps>> handler)
      Specified by:
      fsProps in interface io.vertx.core.file.FileSystem
    • fsProps

      public io.vertx.core.Future<io.vertx.core.file.FileSystemProps> fsProps(String path)
      Specified by:
      fsProps in interface io.vertx.core.file.FileSystem
    • fsPropsBlocking

      public io.vertx.core.file.FileSystemProps fsPropsBlocking(String path)
      Specified by:
      fsPropsBlocking in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.file.FileSystem createTempDirectory(String prefix, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.Future<String> createTempDirectory(String prefix)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectoryBlocking

      public String createTempDirectoryBlocking(String prefix)
      Specified by:
      createTempDirectoryBlocking in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.file.FileSystem createTempDirectory(String prefix, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.Future<String> createTempDirectory(String prefix, String perms)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectoryBlocking

      public String createTempDirectoryBlocking(String prefix, String perms)
      Specified by:
      createTempDirectoryBlocking in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.file.FileSystem createTempDirectory(String dir, String prefix, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectory

      public io.vertx.core.Future<String> createTempDirectory(String dir, String prefix, String perms)
      Specified by:
      createTempDirectory in interface io.vertx.core.file.FileSystem
    • createTempDirectoryBlocking

      public String createTempDirectoryBlocking(String dir, String prefix, String perms)
      Specified by:
      createTempDirectoryBlocking in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.file.FileSystem createTempFile(String prefix, String suffix, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.Future<String> createTempFile(String prefix, String suffix)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFileBlocking

      public String createTempFileBlocking(String prefix, String suffix)
      Specified by:
      createTempFileBlocking in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.file.FileSystem createTempFile(String prefix, String suffix, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.Future<String> createTempFile(String prefix, String suffix, String perms)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFileBlocking

      public String createTempFileBlocking(String prefix, String suffix, String perms)
      Specified by:
      createTempFileBlocking in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.file.FileSystem createTempFile(String dir, String prefix, String suffix, String perms, io.vertx.core.Handler<io.vertx.core.AsyncResult<String>> handler)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFile

      public io.vertx.core.Future<String> createTempFile(String dir, String prefix, String suffix, String perms)
      Specified by:
      createTempFile in interface io.vertx.core.file.FileSystem
    • createTempFileBlocking

      public String createTempFileBlocking(String dir, String prefix, String suffix, String perms)
      Specified by:
      createTempFileBlocking in interface io.vertx.core.file.FileSystem