Class List Method List File List

# Class: Vertx::FileSystem

Inherits:
  Object
  - Object
  - Vertx::FileSystem
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb

## Overview

Contains a broad set of operations for manipulating files on the file system.

A (potential) blocking and non blocking version of each operation is provided.

The non blocking versions take a handler which is called when the operation completes or an error occurs.

The blocking versions are named `xxxBlocking` and return the results, or throw exceptions directly. In many cases, depending on the operating system and file system some of the potentially blocking operations can return quickly, which is why we provide them, but it's highly recommended that you test how long they take to return in your particular application before using them on an event loop.

Please consult the documentation for more information on file system support.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Instance Method Summary (collapse)

- - (self) chmod(path = nil, perms = nil) { ... }
  Change the permissions on the file represented by path to perms, asynchronously.
- - (self) chmod_blocking(path = nil, perms = nil)
  Blocking version of String, Handler).
- - (self) chmod_recursive(path = nil, perms = nil, dirPerms = nil) { ... }
  Change the permissions on the file represented by path to perms, asynchronously.
- - (self) chmod_recursive_blocking(path = nil, perms = nil, dirPerms = nil)
  Blocking version of #chmod_recursive.
- - (self) chown(path = nil, user = nil, group = nil) { ... }
  Change the ownership on the file represented by path to user and group, asynchronously.
- - (self) chown_blocking(path = nil, user = nil, group = nil)
  Blocking version of.
- - (self) copy(from = nil, to = nil) { ... }
  Copy a file from the path from to path to, asynchronously.
- - (self) copy_blocking(from = nil, to = nil)
  Blocking version of #copy.
- - (self) copy_recursive(from = nil, to = nil, recursive = nil) { ... }
  Copy a file from the path from to path to, asynchronously.
- - (self) copy_recursive_blocking(from = nil, to = nil, recursive = nil)
  Blocking version of #copy_recursive.
- - (self) create_file(path = nil, perms = nil) { ... }
  Creates an empty file with the specified path and permissions perms, asynchronously.
- - (self) create_file_blocking(path = nil, perms = nil)
  Blocking version of #create_file.
- - (self) delete(path = nil) { ... }
  Deletes the file represented by the specified path, asynchronously.
- - (self) delete_blocking(path = nil)
  Blocking version of #delete.
- - (self) delete_recursive(path = nil, recursive = nil) { ... }
  Deletes the file represented by the specified path, asynchronously.
- - (self) delete_recursive_blocking(path = nil, recursive = nil)
  Blocking version of #delete_recursive.
- - (self) exists(path = nil) { ... }
  Determines whether the file as specified by the path path exists, asynchronously.
- - (true, false) exists_blocking?(path = nil)
  Blocking version of #exists.
- - (self) fs_props(path = nil) { ... }
  Returns properties of the file-system being used by the specified path, asynchronously.
- - (::Vertx::FileSystemProps) fs_props_blocking(path = nil)
  Blocking version of #fs_props.
- - (self) link(link = nil, existing = nil) { ... }
  Create a hard link on the file system from link to existing, asynchronously.
- - (self) link_blocking(link = nil, existing = nil)
  Blocking version of #link.
- - (self) lprops(path = nil) { ... }
  Obtain properties for the link represented by path, asynchronously.
- - (::Vertx::FileProps) lprops_blocking(path = nil)
  Blocking version of #lprops.
- - (self) mkdir(path = nil, perms = nil) { ... }
  Create the directory represented by path, asynchronously.
- - (self) mkdir_blocking(path = nil, perms = nil)
  Blocking version of #mkdir.
- - (self) mkdirs(path = nil, perms = nil) { ... }
  Create the directory represented by path and any non existent parents, asynchronously.
- - (self) mkdirs_blocking(path = nil, perms = nil)
  Blocking version of #mkdirs.
- - (self) move(from = nil, to = nil) { ... }
  Move a file from the path from to path to, asynchronously.
- - (self) move_blocking(from = nil, to = nil)
  Blocking version of #move.
- - (self) open(path = nil, options = nil) { ... }
  Open the file represented by path, asynchronously.
- - (::Vertx::AsyncFile) open_blocking(path = nil, options = nil)
  Blocking version of #open.
- - (self) props(path = nil) { ... }
  Obtain properties for the file represented by path, asynchronously.
- - (::Vertx::FileProps) props_blocking(path = nil)
  Blocking version of #props.
- - (self) read_dir(path = nil, filter = nil) { ... }
  Read the contents of the directory specified by path, asynchronously.
- - (Array<String>) read_dir_blocking(path = nil, filter = nil)
  Blocking version of #read_dir.
- - (self) read_file(path = nil) { ... }
  Reads the entire file as represented by the path path as a , asynchronously.
- - (::Vertx::Buffer) read_file_blocking(path = nil)
  Blocking version of #read_file.
- - (self) read_symlink(link = nil) { ... }
  Returns the path representing the file that the symbolic link specified by link points to, asynchronously.
- - (String) read_symlink_blocking(link = nil)
  Blocking version of #read_symlink.
- - (self) symlink(link = nil, existing = nil) { ... }
  Create a symbolic link on the file system from link to existing, asynchronously.
- - (self) symlink_blocking(link = nil, existing = nil)
  Blocking version of #link.
- - (self) truncate(path = nil, len = nil) { ... }
  Truncate the file represented by path to length len in bytes, asynchronously.
- - (self) truncate_blocking(path = nil, len = nil)
  Blocking version of #truncate.
- - (self) unlink(link = nil) { ... }
  Unlinks the link on the file system represented by the path link, asynchronously.
- - (self) unlink_blocking(link = nil)
  Blocking version of #unlink.
- - (self) write_file(path = nil, data = nil) { ... }
  Creates the file, and writes the specified Buffer data to the file represented by the path path, asynchronously.
- - (self) write_file_blocking(path = nil, data = nil)
  Blocking version of #write_file.

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 32

    def @@j_api_type.accept?(obj)
      obj.class == FileSystem
    end

### + (`Object`) j_api_type

    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 41

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    44
    45
    46
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 44

    def self.j_class
      Java::IoVertxCoreFile::FileSystem.java_class
    end

### + (`Object`) unwrap(obj)

    38
    39
    40
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 38

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

    35
    36
    37
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 35

    def @@j_api_type.wrap(obj)
      FileSystem.new(obj)
    end

## Instance Method Details

### - (`self`) chmod(path = nil, perms = nil) { ... }

Change the permissions on the file represented by `path` to `perms`, asynchronously.

The permission String takes the form rwxr-x--- as specified here.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file
- perms (`String`) (defaults to: `nil`) —
  the permissions string

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    160
    161
    162
    163
    164
    165
    166
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 160

    def chmod(path=nil,perms=nil)
      if path.class == String && perms.class == String && block_given?
        @j_del.java_method(:chmod, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chmod(#{path},#{perms})"
    end

### - (`self`) chmod_blocking(path = nil, perms = nil)

Blocking version of String, Handler)

Parameters:

- path (`String`) (defaults to: `nil`)
- perms (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    171
    172
    173
    174
    175
    176
    177
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 171

    def chmod_blocking(path=nil,perms=nil)
      if path.class == String && perms.class == String && !block_given?
        @j_del.java_method(:chmodBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,perms)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chmod_blocking(#{path},#{perms})"
    end

### - (`self`) chmod_recursive(path = nil, perms = nil, dirPerms = nil) { ... }

Change the permissions on the file represented by `path` to `perms`, asynchronously.

The permission String takes the form rwxr-x--- as specified in http://download.oracle.com/javase/7/docs/api/java/nio/file/attribute/PosixFilePermissions.html.

If the file is directory then all contents will also have their permissions changed recursively. Any directory permissions will be set to `dirPerms`, whilst any normal file permissions will be set to `perms`.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file
- perms (`String`) (defaults to: `nil`) —
  the permissions string
- dirPerms (`String`) (defaults to: `nil`) —
  the directory permissions

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    189
    190
    191
    192
    193
    194
    195
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 189

    def chmod_recursive(path=nil,perms=nil,dirPerms=nil)
      if path.class == String && perms.class == String && dirPerms.class == String && block_given?
        @j_del.java_method(:chmodRecursive, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,perms,dirPerms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chmod_recursive(#{path},#{perms},#{dirPerms})"
    end

### - (`self`) chmod_recursive_blocking(path = nil, perms = nil, dirPerms = nil)

Blocking version of #chmod_recursive

Parameters:

- path (`String`) (defaults to: `nil`)
- perms (`String`) (defaults to: `nil`)
- dirPerms (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    201
    202
    203
    204
    205
    206
    207
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 201

    def chmod_recursive_blocking(path=nil,perms=nil,dirPerms=nil)
      if path.class == String && perms.class == String && dirPerms.class == String && !block_given?
        @j_del.java_method(:chmodRecursiveBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,perms,dirPerms)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chmod_recursive_blocking(#{path},#{perms},#{dirPerms})"
    end

### - (`self`) chown(path = nil, user = nil, group = nil) { ... }

Change the ownership on the file represented by `path` to `user` and group, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file
- user (`String`) (defaults to: `nil`) —
  the user name, `null` will not change the user name
- group (`String`) (defaults to: `nil`) —
  the user group, `null` will not change the user group name

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    214
    215
    216
    217
    218
    219
    220
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 214

    def chown(path=nil,user=nil,group=nil)
      if path.class == String && user.class == String && group.class == String && block_given?
        @j_del.java_method(:chown, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,user,group,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chown(#{path},#{user},#{group})"
    end

### - (`self`) chown_blocking(path = nil, user = nil, group = nil)

Blocking version of

Parameters:

- path (`String`) (defaults to: `nil`)
- user (`String`) (defaults to: `nil`)
- group (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    227
    228
    229
    230
    231
    232
    233
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 227

    def chown_blocking(path=nil,user=nil,group=nil)
      if path.class == String && user.class == String && group.class == String && !block_given?
        @j_del.java_method(:chownBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,user,group)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling chown_blocking(#{path},#{user},#{group})"
    end

### - (`self`) copy(from = nil, to = nil) { ... }

Copy a file from the path `from` to path `to`, asynchronously.

The copy will fail if the destination already exists.

Parameters:

- from (`String`) (defaults to: `nil`) —
  the path to copy from
- to (`String`) (defaults to: `nil`) —
  the path to copy to

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    54
    55
    56
    57
    58
    59
    60
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 54

    def copy(from=nil,to=nil)
      if from.class == String && to.class == String && block_given?
        @j_del.java_method(:copy, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(from,to,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling copy(#{from},#{to})"
    end

### - (`self`) copy_blocking(from = nil, to = nil)

Blocking version of #copy

Parameters:

- from (`String`) (defaults to: `nil`)
- to (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    65
    66
    67
    68
    69
    70
    71
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 65

    def copy_blocking(from=nil,to=nil)
      if from.class == String && to.class == String && !block_given?
        @j_del.java_method(:copyBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(from,to)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling copy_blocking(#{from},#{to})"
    end

### - (`self`) copy_recursive(from = nil, to = nil, recursive = nil) { ... }

Copy a file from the path `from` to path `to`, asynchronously.

If `recursive` is `true` and `from` represents a directory, then the directory and its contents will be copied recursively to the destination `to`.

The copy will fail if the destination if the destination already exists.

Parameters:

- from (`String`) (defaults to: `nil`) —
  the path to copy from
- to (`String`) (defaults to: `nil`) —
  the path to copy to
- recursive (`true`, `false`) (defaults to: `nil`)

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    83
    84
    85
    86
    87
    88
    89
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 83

    def copy_recursive(from=nil,to=nil,recursive=nil)
      if from.class == String && to.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && block_given?
        @j_del.java_method(:copyRecursive, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(from,to,recursive,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling copy_recursive(#{from},#{to},#{recursive})"
    end

### - (`self`) copy_recursive_blocking(from = nil, to = nil, recursive = nil)

Blocking version of #copy_recursive

Parameters:

- from (`String`) (defaults to: `nil`)
- to (`String`) (defaults to: `nil`)
- recursive (`true`, `false`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    95
    96
    97
    98
    99
    100
    101
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 95

    def copy_recursive_blocking(from=nil,to=nil,recursive=nil)
      if from.class == String && to.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && !block_given?
        @j_del.java_method(:copyRecursiveBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::boolean.java_class]).call(from,to,recursive)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling copy_recursive_blocking(#{from},#{to},#{recursive})"
    end

### - (`self`) create_file(path = nil, perms = nil) { ... }

Creates an empty file with the specified `path` and permissions `perms`, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- perms (`String`) (defaults to: `nil`) —
  the permissions string

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 591

    def create_file(path=nil,perms=nil)
      if path.class == String && block_given? && perms == nil
        @j_del.java_method(:createFile, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      elsif path.class == String && perms.class == String && block_given?
        @j_del.java_method(:createFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling create_file(#{path},#{perms})"
    end

### - (`self`) create_file_blocking(path = nil, perms = nil)

Blocking version of #create_file

Parameters:

- path (`String`) (defaults to: `nil`)
- perms (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 605

    def create_file_blocking(path=nil,perms=nil)
      if path.class == String && !block_given? && perms == nil
        @j_del.java_method(:createFileBlocking, [Java::java.lang.String.java_class]).call(path)
        return self
      elsif path.class == String && perms.class == String && !block_given?
        @j_del.java_method(:createFileBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,perms)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling create_file_blocking(#{path},#{perms})"
    end

### - (`self`) delete(path = nil) { ... }

Deletes the file represented by the specified `path`, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    369
    370
    371
    372
    373
    374
    375
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 369

    def delete(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:delete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete(#{path})"
    end

### - (`self`) delete_blocking(path = nil)

Blocking version of #delete

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    379
    380
    381
    382
    383
    384
    385
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 379

    def delete_blocking(path=nil)
      if path.class == String && !block_given?
        @j_del.java_method(:deleteBlocking, [Java::java.lang.String.java_class]).call(path)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete_blocking(#{path})"
    end

### - (`self`) delete_recursive(path = nil, recursive = nil) { ... }

Deletes the file represented by the specified `path`, asynchronously.

If the path represents a directory and `recursive = true` then the directory and its contents will be deleted recursively.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- recursive (`true`, `false`) (defaults to: `nil`) —
  delete recursively?

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    394
    395
    396
    397
    398
    399
    400
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 394

    def delete_recursive(path=nil,recursive=nil)
      if path.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && block_given?
        @j_del.java_method(:deleteRecursive, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(path,recursive,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete_recursive(#{path},#{recursive})"
    end

### - (`self`) delete_recursive_blocking(path = nil, recursive = nil)

Blocking version of #delete_recursive

Parameters:

- path (`String`) (defaults to: `nil`)
- recursive (`true`, `false`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    405
    406
    407
    408
    409
    410
    411
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 405

    def delete_recursive_blocking(path=nil,recursive=nil)
      if path.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && !block_given?
        @j_del.java_method(:deleteRecursiveBlocking, [Java::java.lang.String.java_class,Java::boolean.java_class]).call(path,recursive)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling delete_recursive_blocking(#{path},#{recursive})"
    end

### - (`self`) exists(path = nil) { ... }

Determines whether the file as specified by the path `path` exists, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    619
    620
    621
    622
    623
    624
    625
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 619

    def exists(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:exists, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling exists(#{path})"
    end

### - (`true`, `false`) exists_blocking?(path = nil)

Blocking version of #exists

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`true`, `false`)

Raises:

- (`ArgumentError`)

    629
    630
    631
    632
    633
    634
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 629

    def exists_blocking?(path=nil)
      if path.class == String && !block_given?
        return @j_del.java_method(:existsBlocking, [Java::java.lang.String.java_class]).call(path)
      end
      raise ArgumentError, "Invalid arguments when calling exists_blocking?(#{path})"
    end

### - (`self`) fs_props(path = nil) { ... }

Returns properties of the file-system being used by the specified `path`, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to anywhere on the filesystem

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    639
    640
    641
    642
    643
    644
    645
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 639

    def fs_props(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:fsProps, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::FileSystemProps) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling fs_props(#{path})"
    end

### - (`::Vertx::FileSystemProps`) fs_props_blocking(path = nil)

Blocking version of #fs_props

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`::Vertx::FileSystemProps`)

Raises:

- (`ArgumentError`)

    649
    650
    651
    652
    653
    654
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 649

    def fs_props_blocking(path=nil)
      if path.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:fsPropsBlocking, [Java::java.lang.String.java_class]).call(path),::Vertx::FileSystemProps)
      end
      raise ArgumentError, "Invalid arguments when calling fs_props_blocking(#{path})"
    end

### - (`self`) link(link = nil, existing = nil) { ... }

Create a hard link on the file system from `link` to `existing`, asynchronously.

Parameters:

- link (`String`) (defaults to: `nil`) —
  the link
- existing (`String`) (defaults to: `nil`) —
  the link destination

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    283
    284
    285
    286
    287
    288
    289
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 283

    def link(link=nil,existing=nil)
      if link.class == String && existing.class == String && block_given?
        @j_del.java_method(:link, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(link,existing,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling link(#{link},#{existing})"
    end

### - (`self`) link_blocking(link = nil, existing = nil)

Blocking version of #link

Parameters:

- link (`String`) (defaults to: `nil`)
- existing (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    294
    295
    296
    297
    298
    299
    300
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 294

    def link_blocking(link=nil,existing=nil)
      if link.class == String && existing.class == String && !block_given?
        @j_del.java_method(:linkBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(link,existing)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling link_blocking(#{link},#{existing})"
    end

### - (`self`) lprops(path = nil) { ... }

Obtain properties for the link represented by `path`, asynchronously.

The link will not be followed.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    262
    263
    264
    265
    266
    267
    268
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 262

    def lprops(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:lprops, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::FileProps) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling lprops(#{path})"
    end

### - (`::Vertx::FileProps`) lprops_blocking(path = nil)

Blocking version of #lprops

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`::Vertx::FileProps`)

Raises:

- (`ArgumentError`)

    272
    273
    274
    275
    276
    277
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 272

    def lprops_blocking(path=nil)
      if path.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:lpropsBlocking, [Java::java.lang.String.java_class]).call(path),::Vertx::FileProps)
      end
      raise ArgumentError, "Invalid arguments when calling lprops_blocking(#{path})"
    end

### - (`self`) mkdir(path = nil, perms = nil) { ... }

Create the directory represented by `path`, asynchronously.

The new directory will be created with permissions as specified by `perms`.

The permission String takes the form rwxr-x--- as specified in here.

The operation will fail if the directory already exists.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- perms (`String`) (defaults to: `nil`) —
  the permissions string

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 424

    def mkdir(path=nil,perms=nil)
      if path.class == String && block_given? && perms == nil
        @j_del.java_method(:mkdir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      elsif path.class == String && perms.class == String && block_given?
        @j_del.java_method(:mkdir, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling mkdir(#{path},#{perms})"
    end

### - (`self`) mkdir_blocking(path = nil, perms = nil)

Blocking version of #mkdir

Parameters:

- path (`String`) (defaults to: `nil`)
- perms (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 438

    def mkdir_blocking(path=nil,perms=nil)
      if path.class == String && !block_given? && perms == nil
        @j_del.java_method(:mkdirBlocking, [Java::java.lang.String.java_class]).call(path)
        return self
      elsif path.class == String && perms.class == String && !block_given?
        @j_del.java_method(:mkdirBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,perms)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling mkdir_blocking(#{path},#{perms})"
    end

### - (`self`) mkdirs(path = nil, perms = nil) { ... }

Create the directory represented by `path` and any non existent parents, asynchronously.

The new directory will be created with permissions as specified by `perms`.

The permission String takes the form rwxr-x--- as specified in here.

The operation will fail if the directory already exists.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- perms (`String`) (defaults to: `nil`) —
  the permissions string

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 460

    def mkdirs(path=nil,perms=nil)
      if path.class == String && block_given? && perms == nil
        @j_del.java_method(:mkdirs, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      elsif path.class == String && perms.class == String && block_given?
        @j_del.java_method(:mkdirs, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling mkdirs(#{path},#{perms})"
    end

### - (`self`) mkdirs_blocking(path = nil, perms = nil)

Blocking version of #mkdirs

Parameters:

- path (`String`) (defaults to: `nil`)
- perms (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 474

    def mkdirs_blocking(path=nil,perms=nil)
      if path.class == String && !block_given? && perms == nil
        @j_del.java_method(:mkdirsBlocking, [Java::java.lang.String.java_class]).call(path)
        return self
      elsif path.class == String && perms.class == String && !block_given?
        @j_del.java_method(:mkdirsBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,perms)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling mkdirs_blocking(#{path},#{perms})"
    end

### - (`self`) move(from = nil, to = nil) { ... }

Move a file from the path `from` to path `to`, asynchronously.

The move will fail if the destination already exists.

Parameters:

- from (`String`) (defaults to: `nil`) —
  the path to copy from
- to (`String`) (defaults to: `nil`) —
  the path to copy to

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    109
    110
    111
    112
    113
    114
    115
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 109

    def move(from=nil,to=nil)
      if from.class == String && to.class == String && block_given?
        @j_del.java_method(:move, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(from,to,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling move(#{from},#{to})"
    end

### - (`self`) move_blocking(from = nil, to = nil)

Blocking version of #move

Parameters:

- from (`String`) (defaults to: `nil`)
- to (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    120
    121
    122
    123
    124
    125
    126
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 120

    def move_blocking(from=nil,to=nil)
      if from.class == String && to.class == String && !block_given?
        @j_del.java_method(:moveBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(from,to)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling move_blocking(#{from},#{to})"
    end

### - (`self`) open(path = nil, options = nil) { ... }

Open the file represented by `path`, asynchronously.

The file is opened for both reading and writing. If the file does not already exist it will be created.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- options (`Hash`) (defaults to: `nil`) —
  options describing how the file should be opened

Yields:

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    569
    570
    571
    572
    573
    574
    575
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 569

    def open(path=nil,options=nil)
      if path.class == String && options.class == Hash && block_given?
        @j_del.java_method(:open, [Java::java.lang.String.java_class,Java::IoVertxCoreFile::OpenOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(path,Java::IoVertxCoreFile::OpenOptions.new(::Vertx::Util::Utils.to_json_object(options)),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::AsyncFile) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling open(#{path},#{options})"
    end

### - (`::Vertx::AsyncFile`) open_blocking(path = nil, options = nil)

Blocking version of #open

Parameters:

- path (`String`) (defaults to: `nil`)
- options (`Hash`) (defaults to: `nil`)

Returns:

- (`::Vertx::AsyncFile`)

Raises:

- (`ArgumentError`)

    580
    581
    582
    583
    584
    585
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 580

    def open_blocking(path=nil,options=nil)
      if path.class == String && options.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:openBlocking, [Java::java.lang.String.java_class,Java::IoVertxCoreFile::OpenOptions.java_class]).call(path,Java::IoVertxCoreFile::OpenOptions.new(::Vertx::Util::Utils.to_json_object(options))),::Vertx::AsyncFile)
      end
      raise ArgumentError, "Invalid arguments when calling open_blocking(#{path},#{options})"
    end

### - (`self`) props(path = nil) { ... }

Obtain properties for the file represented by `path`, asynchronously.

If the file is a link, the link will be followed.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    240
    241
    242
    243
    244
    245
    246
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 240

    def props(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:props, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::FileProps) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling props(#{path})"
    end

### - (`::Vertx::FileProps`) props_blocking(path = nil)

Blocking version of #props

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`::Vertx::FileProps`)

Raises:

- (`ArgumentError`)

    250
    251
    252
    253
    254
    255
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 250

    def props_blocking(path=nil)
      if path.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:propsBlocking, [Java::java.lang.String.java_class]).call(path),::Vertx::FileProps)
      end
      raise ArgumentError, "Invalid arguments when calling props_blocking(#{path})"
    end

### - (`self`) read_dir(path = nil, filter = nil) { ... }

Read the contents of the directory specified by `path`, asynchronously.

The parameter `filter` is a regular expression. If `filter` is specified then only the paths that match @{filter}will be returned.

The result is an array of String representing the paths of the files inside the directory.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the directory
- filter (`String`) (defaults to: `nil`) —
  the filter expression

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 494

    def read_dir(path=nil,filter=nil)
      if path.class == String && block_given? && filter == nil
        @j_del.java_method(:readDir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) }))
        return self
      elsif path.class == String && filter.class == String && block_given?
        @j_del.java_method(:readDir, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,filter,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling read_dir(#{path},#{filter})"
    end

### - (`Array<String>`) read_dir_blocking(path = nil, filter = nil)

Blocking version of #read_dir

Parameters:

- path (`String`) (defaults to: `nil`)
- filter (`String`) (defaults to: `nil`)

Returns:

- (`Array<String>`)

Raises:

- (`ArgumentError`)

    508
    509
    510
    511
    512
    513
    514
    515
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 508

    def read_dir_blocking(path=nil,filter=nil)
      if path.class == String && !block_given? && filter == nil
        return @j_del.java_method(:readDirBlocking, [Java::java.lang.String.java_class]).call(path).to_a.map { |elt| elt }
      elsif path.class == String && filter.class == String && !block_given?
        return @j_del.java_method(:readDirBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(path,filter).to_a.map { |elt| elt }
      end
      raise ArgumentError, "Invalid arguments when calling read_dir_blocking(#{path},#{filter})"
    end

### - (`self`) read_file(path = nil) { ... }

Reads the entire file as represented by the path `path` as a , asynchronously.

Do not user this method to read very large files or you risk running out of available RAM.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    522
    523
    524
    525
    526
    527
    528
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 522

    def read_file(path=nil)
      if path.class == String && block_given?
        @j_del.java_method(:readFile, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(path,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::Buffer) : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling read_file(#{path})"
    end

### - (`::Vertx::Buffer`) read_file_blocking(path = nil)

Blocking version of #read_file

Parameters:

- path (`String`) (defaults to: `nil`)

Returns:

- (`::Vertx::Buffer`)

Raises:

- (`ArgumentError`)

    532
    533
    534
    535
    536
    537
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 532

    def read_file_blocking(path=nil)
      if path.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:readFileBlocking, [Java::java.lang.String.java_class]).call(path),::Vertx::Buffer)
      end
      raise ArgumentError, "Invalid arguments when calling read_file_blocking(#{path})"
    end

### - (`self`) read_symlink(link = nil) { ... }

Returns the path representing the file that the symbolic link specified by `link` points to, asynchronously.

Parameters:

- link (`String`) (defaults to: `nil`) —
  the link

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    349
    350
    351
    352
    353
    354
    355
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 349

    def read_symlink(link=nil)
      if link.class == String && block_given?
        @j_del.java_method(:readSymlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(link,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling read_symlink(#{link})"
    end

### - (`String`) read_symlink_blocking(link = nil)

Blocking version of #read_symlink

Parameters:

- link (`String`) (defaults to: `nil`)

Returns:

- (`String`)

Raises:

- (`ArgumentError`)

    359
    360
    361
    362
    363
    364
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 359

    def read_symlink_blocking(link=nil)
      if link.class == String && !block_given?
        return @j_del.java_method(:readSymlinkBlocking, [Java::java.lang.String.java_class]).call(link)
      end
      raise ArgumentError, "Invalid arguments when calling read_symlink_blocking(#{link})"
    end

### - (`self`) symlink(link = nil, existing = nil) { ... }

Create a symbolic link on the file system from `link` to `existing`, asynchronously.

Parameters:

- link (`String`) (defaults to: `nil`) —
  the link
- existing (`String`) (defaults to: `nil`) —
  the link destination

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    306
    307
    308
    309
    310
    311
    312
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 306

    def symlink(link=nil,existing=nil)
      if link.class == String && existing.class == String && block_given?
        @j_del.java_method(:symlink, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(link,existing,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling symlink(#{link},#{existing})"
    end

### - (`self`) symlink_blocking(link = nil, existing = nil)

Blocking version of #link

Parameters:

- link (`String`) (defaults to: `nil`)
- existing (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    317
    318
    319
    320
    321
    322
    323
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 317

    def symlink_blocking(link=nil,existing=nil)
      if link.class == String && existing.class == String && !block_given?
        @j_del.java_method(:symlinkBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(link,existing)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling symlink_blocking(#{link},#{existing})"
    end

### - (`self`) truncate(path = nil, len = nil) { ... }

Truncate the file represented by `path` to length `len` in bytes, asynchronously.

The operation will fail if the file does not exist or `len` is less than `zero`.

Parameters:

- path (`String`) (defaults to: `nil`) —
  the path to the file
- len (`Fixnum`) (defaults to: `nil`) —
  the length to truncate it to

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    134
    135
    136
    137
    138
    139
    140
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 134

    def truncate(path=nil,len=nil)
      if path.class == String && len.class == Fixnum && block_given?
        @j_del.java_method(:truncate, [Java::java.lang.String.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(path,len,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling truncate(#{path},#{len})"
    end

### - (`self`) truncate_blocking(path = nil, len = nil)

Blocking version of #truncate

Parameters:

- path (`String`) (defaults to: `nil`)
- len (`Fixnum`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    145
    146
    147
    148
    149
    150
    151
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 145

    def truncate_blocking(path=nil,len=nil)
      if path.class == String && len.class == Fixnum && !block_given?
        @j_del.java_method(:truncateBlocking, [Java::java.lang.String.java_class,Java::long.java_class]).call(path,len)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling truncate_blocking(#{path},#{len})"
    end

### - (`self`) unlink(link = nil) { ... }

Unlinks the link on the file system represented by the path `link`, asynchronously.

Parameters:

- link (`String`) (defaults to: `nil`) —
  the link

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    328
    329
    330
    331
    332
    333
    334
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 328

    def unlink(link=nil)
      if link.class == String && block_given?
        @j_del.java_method(:unlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(link,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling unlink(#{link})"
    end

### - (`self`) unlink_blocking(link = nil)

Blocking version of #unlink

Parameters:

- link (`String`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    338
    339
    340
    341
    342
    343
    344
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 338

    def unlink_blocking(link=nil)
      if link.class == String && !block_given?
        @j_del.java_method(:unlinkBlocking, [Java::java.lang.String.java_class]).call(link)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling unlink_blocking(#{link})"
    end

### - (`self`) write_file(path = nil, data = nil) { ... }

Creates the file, and writes the specified `Buffer data` to the file represented by the path `path`, asynchronously.

Parameters:

- path (`String`) (defaults to: `nil`) —
  path to the file
- data (`::Vertx::Buffer`) (defaults to: `nil`)

Yields:

- the handler that will be called on completion

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    544
    545
    546
    547
    548
    549
    550
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 544

    def write_file(path=nil,data=nil)
      if path.class == String && data.class.method_defined?(:j_del) && block_given?
        @j_del.java_method(:writeFile, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(path,data.j_del,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write_file(#{path},#{data})"
    end

### - (`self`) write_file_blocking(path = nil, data = nil)

Blocking version of #write_file

Parameters:

- path (`String`) (defaults to: `nil`)
- data (`::Vertx::Buffer`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    555
    556
    557
    558
    559
    560
    561
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/file_system.rb', line 555

    def write_file_blocking(path=nil,data=nil)
      if path.class == String && data.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:writeFileBlocking, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(path,data.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write_file_blocking(#{path},#{data})"
    end