Class: Vertx::FileSystem

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/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)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


34
35
36
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 34

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

+ (Object) j_api_type



43
44
45
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 43

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



46
47
48
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 46

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

+ (Object) unwrap(obj)



40
41
42
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 40

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

+ (Object) wrap(obj)



37
38
39
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 37

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

Instance Method Details

- (self) chmod(path, perms, handler) { ... }

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)
    the path to the file
  • perms (String)
    the permissions string

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 757

def chmod(*args)
  if args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:chmod, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chmod(#{args[0]},#{args[1]})"
  end
end

- (self) chmodBlocking(path, perms)

Blocking version of String, Handler)

Parameters:

  • path (String)
  • perms (String)

Returns:

  • (self)


779
780
781
782
783
784
785
786
787
788
789
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 779

def chmod_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given?
    @j_del.java_method(:chmodBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chmod_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) chmodRecursive(path, perms, dirPerms, handler) { ... }

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)
    the path to the file
  • perms (String)
    the permissions string
  • dirPerms (String)
    the directory permissions

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 889

def chmod_recursive(*args)
  if args[0].class == String && args[1].class == String && args[2].class == String && true
    if (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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chmod_recursive(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) chmodRecursiveBlocking(path, perms, dirPerms)

Blocking version of #chmod_recursive

Parameters:

  • path (String)
  • perms (String)
  • dirPerms (String)

Returns:

  • (self)


685
686
687
688
689
690
691
692
693
694
695
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 685

def chmod_recursive_blocking(*args)
  if args[0].class == String && args[1].class == String && args[2].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(args[0],args[1],args[2])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chmod_recursive_blocking(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) chown(path, user, group, handler) { ... }

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

Parameters:

  • path (String)
    the path to the file
  • user (String)
    the user name, null will not change the user name
  • group (String)
    the user group, null will not change the user group name

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 275

def chown(*args)
  if args[0].class == String && args[1].class == String && args[2].class == String && true
    if (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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chown(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) chownBlocking(path, user, group)

Blocking version of

Parameters:

  • path (String)
  • user (String)
  • group (String)

Returns:

  • (self)


257
258
259
260
261
262
263
264
265
266
267
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 257

def chown_blocking(*args)
  if args[0].class == String && args[1].class == String && args[2].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(args[0],args[1],args[2])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling chown_blocking(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) copy(from, to, handler) { ... } - (self) copy(from, to, options, handler) { ... }

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

Overloads:

  • - (self) copy(from, to, handler) { ... }

    Parameters:

    • from (String)
      the path to copy from
    • to (String)
      the path to copy to

    Yields:

    • the handler that will be called on completion
  • - (self) copy(from, to, options, handler) { ... }

    Parameters:

    • from (String)
      the path to copy from
    • to (String)
      the path to copy to
    • options (Hash{String => Object})
      options describing how the file should be copied

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 827

def copy(*args)
  if args[0].class == String && args[1].class == String && true && args[2] == nil
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:copy, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && args[2].class == Hash && true
    if (block_given?)
      @j_del.java_method(:copy, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreFile::CopyOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:copy, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreFile::CopyOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling copy(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) copyBlocking(from, to)

Blocking version of #copy

Parameters:

  • from (String)
  • to (String)

Returns:

  • (self)


911
912
913
914
915
916
917
918
919
920
921
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 911

def copy_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given?
    @j_del.java_method(:copyBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling copy_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) copyRecursive(from, to, recursive, handler) { ... }

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)
    the path to copy from
  • to (String)
    the path to copy to
  • recursive (true, false)

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 731

def copy_recursive(*args)
  if args[0].class == String && args[1].class == String && (args[2].class == TrueClass || args[2].class == FalseClass) && true
    if (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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @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(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling copy_recursive(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) copyRecursiveBlocking(from, to, recursive)

Blocking version of #copy_recursive

Parameters:

  • from (String)
  • to (String)
  • recursive (true, false)

Returns:

  • (self)


183
184
185
186
187
188
189
190
191
192
193
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 183

def copy_recursive_blocking(*args)
  if args[0].class == String && args[1].class == String && (args[2].class == TrueClass || args[2].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(args[0],args[1],args[2])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling copy_recursive_blocking(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) createFile(path, handler) { ... } - (self) createFile(path, perms, handler) { ... }

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

Overloads:

  • - (self) createFile(path, handler) { ... }

    Parameters:

    • path (String)
      path to the file

    Yields:

    • the handler that will be called on completion
  • - (self) createFile(path, perms, handler) { ... }

    Parameters:

    • path (String)
      path to the file
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 112

def create_file(*args)
  if args[0].class == String && true && args[1] == nil
    if (block_given?)
      @j_del.java_method(:createFile, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createFile, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_file(#{args[0]},#{args[1]})"
  end
end

- (self) createFileBlocking(path) - (self) createFileBlocking(path, perms)

Blocking version of #create_file

Overloads:

  • - (self) createFileBlocking(path)

    Parameters:

    • path (String)
  • - (self) createFileBlocking(path, perms)

    Parameters:

    • path (String)
    • perms (String)

Returns:

  • (self)


1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1043

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

- (self) createTempDirectory(prefix, handler) { ... } - (self) createTempDirectory(prefix, perms, handler) { ... } - (self) createTempDirectory(dir, prefix, perms, handler) { ... }

Creates a new directory in the directory provided by the path path, using the given prefix to generate its name, 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.

As with the File.createTempFile methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically.

Overloads:

  • - (self) createTempDirectory(prefix, handler) { ... }

    Parameters:

    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null

    Yields:

    • the handler that will be called on completion
  • - (self) createTempDirectory(prefix, perms, handler) { ... }

    Parameters:

    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion
  • - (self) createTempDirectory(dir, prefix, perms, handler) { ... }

    Parameters:

    • dir (String)
      the path to directory in which to create the directory
    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1001

def create_temp_directory(*args)
  if args[0].class == String && true && args[1] == nil && args[2] == nil
    if (block_given?)
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && true && args[2] == nil
    if (block_given?)
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && args[2].class == String && true
    if (block_given?)
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_temp_directory(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (String) createTempDirectoryBlocking(prefix) - (String) createTempDirectoryBlocking(prefix, perms) - (String) createTempDirectoryBlocking(dir, prefix, perms)

Blocking version of #create_temp_directory

Overloads:

  • - (String) createTempDirectoryBlocking(prefix)

    Parameters:

    • prefix (String)
  • - (String) createTempDirectoryBlocking(prefix, perms)

    Parameters:

    • prefix (String)
    • perms (String)
  • - (String) createTempDirectoryBlocking(dir, prefix, perms)

    Parameters:

    • dir (String)
    • prefix (String)
    • perms (String)

Returns:

  • (String)


60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 60

def create_temp_directory_blocking(*args)
  if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil
    return @j_del.java_method(:createTempDirectoryBlocking, [Java::java.lang.String.java_class]).call(args[0])
  elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == nil
    return @j_del.java_method(:createTempDirectoryBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
  elsif args[0].class == String && args[1].class == String && args[2].class == String && !block_given?
    return @j_del.java_method(:createTempDirectoryBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2])
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_temp_directory_blocking(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) createTempFile(prefix, suffix, handler) { ... } - (self) createTempFile(prefix, suffix, perms, handler) { ... } - (self) createTempFile(dir, prefix, suffix, perms, handler) { ... }

Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, 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.

As with the File.createTempFile methods, this method is only part of a temporary-file facility.A #addShutdownHook shutdown-hook, or the deleteOnExit mechanism may be used to delete the directory automatically.

Overloads:

  • - (self) createTempFile(prefix, suffix, handler) { ... }

    Parameters:

    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null
    • suffix (String)
      the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used

    Yields:

    • the handler that will be called on completion
  • - (self) createTempFile(prefix, suffix, perms, handler) { ... }

    Parameters:

    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null
    • suffix (String)
      the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
    • perms (String)

    Yields:

    • the handler that will be called on completion
  • - (self) createTempFile(dir, prefix, suffix, perms, handler) { ... }

    Parameters:

    • dir (String)
      the path to directory in which to create the directory
    • prefix (String)
      the prefix string to be used in generating the directory's name; may be null
    • suffix (String)
      the suffix string to be used in generating the file's name; may be null, in which case ".tmp" is used
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 336

def create_temp_file(*args)
  if args[0].class == String && args[1].class == String && true && args[2] == nil && args[3] == nil
    if (block_given?)
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && args[2].class == String && true && args[3] == nil
    if (block_given?)
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && args[2].class == String && args[3].class == String && true
    if (block_given?)
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],args[3],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],args[2],args[3],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_temp_file(#{args[0]},#{args[1]},#{args[2]},#{args[3]})"
  end
end

- (String) createTempFileBlocking(prefix, suffix) - (String) createTempFileBlocking(prefix, suffix, perms) - (String) createTempFileBlocking(dir, prefix, suffix, perms)

Blocking version of #create_temp_file

Overloads:

  • - (String) createTempFileBlocking(prefix, suffix)

    Parameters:

    • prefix (String)
    • suffix (String)
  • - (String) createTempFileBlocking(prefix, suffix, perms)

    Parameters:

    • prefix (String)
    • suffix (String)
    • perms (String)
  • - (String) createTempFileBlocking(dir, prefix, suffix, perms)

    Parameters:

    • dir (String)
    • prefix (String)
    • suffix (String)
    • perms (String)

Returns:

  • (String)


584
585
586
587
588
589
590
591
592
593
594
595
596
597
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 584

def create_temp_file_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given? && args[2] == nil && args[3] == nil
    return @j_del.java_method(:createTempFileBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
  elsif args[0].class == String && args[1].class == String && args[2].class == String && !block_given? && args[3] == nil
    return @j_del.java_method(:createTempFileBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2])
  elsif args[0].class == String && args[1].class == String && args[2].class == String && args[3].class == String && !block_given?
    return @j_del.java_method(:createTempFileBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2],args[3])
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling create_temp_file_blocking(#{args[0]},#{args[1]},#{args[2]},#{args[3]})"
  end
end

- (self) delete(path, handler) { ... }

Deletes the file represented by the specified path, asynchronously.

Parameters:

  • path (String)
    path to the file

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 648

def delete(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:delete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:delete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete(#{args[0]})"
  end
end

- (self) deleteBlocking(path)

Blocking version of #delete

Parameters:

  • path (String)

Returns:

  • (self)


78
79
80
81
82
83
84
85
86
87
88
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 78

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

- (self) deleteRecursive(path, recursive, handler) { ... }

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)
    path to the file
  • recursive (true, false)
    delete recursively?

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 799

def delete_recursive(*args)
  if args[0].class == String && (args[1].class == TrueClass || args[1].class == FalseClass) && true
    if (block_given?)
      @j_del.java_method(:deleteRecursive, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:deleteRecursive, [Java::java.lang.String.java_class,Java::boolean.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling delete_recursive(#{args[0]},#{args[1]})"
  end
end

- (self) deleteRecursiveBlocking(path, recursive)

Blocking version of #delete_recursive

Parameters:

  • path (String)
  • recursive (true, false)

Returns:

  • (self)


927
928
929
930
931
932
933
934
935
936
937
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 927

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

- (self) exists(path, handler) { ... }

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

Parameters:

  • path (String)
    path to the file

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1245

def exists(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:exists, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:exists, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling exists(#{args[0]})"
  end
end

- (true, false) existsBlocking(path)

Blocking version of #exists

Parameters:

  • path (String)

Returns:

  • (true, false)


1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1206

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

- (self) fsProps(path, handler) { ... }

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

Parameters:

  • path (String)
    path to anywhere on the filesystem

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 460

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

- (::Vertx::FileSystemProps) fsPropsBlocking(path)

Blocking version of #fs_props

Parameters:

  • path (String)

Returns:



167
168
169
170
171
172
173
174
175
176
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 167

def fs_props_blocking(*args)
  if args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:fsPropsBlocking, [Java::java.lang.String.java_class]).call(args[0]),::Vertx::FileSystemProps)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling fs_props_blocking(#{args[0]})"
  end
end
Create a hard link on the file system from link to existing, asynchronously.

Parameters:

  • link (String)
    the link
  • existing (String)
    the link destination

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 604

def link(*args)
  if args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:link, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling link(#{args[0]},#{args[1]})"
  end
end
Blocking version of #link

Parameters:

  • link (String)
  • existing (String)

Returns:

  • (self)


1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1078

def link_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given?
    @j_del.java_method(:linkBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling link_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) lprops(path, handler) { ... }

Obtain properties for the link represented by path, asynchronously.

The link will not be followed.

Parameters:

  • path (String)
    the path to the file

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 393

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

- (::Vertx::FileProps) lpropsBlocking(path)

Blocking version of #lprops

Parameters:

  • path (String)

Returns:



240
241
242
243
244
245
246
247
248
249
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 240

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

- (self) mkdir(path, handler) { ... } - (self) mkdir(path, perms, handler) { ... }

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.

Overloads:

  • - (self) mkdir(path, handler) { ... }

    Parameters:

    • path (String)
      path to the file

    Yields:

    • the handler that will be called on completion
  • - (self) mkdir(path, perms, handler) { ... }

    Parameters:

    • path (String)
      path to the file
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 210

def mkdir(*args)
  if args[0].class == String && true && args[1] == nil
    if (block_given?)
      @j_del.java_method(:mkdir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:mkdir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:mkdir, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling mkdir(#{args[0]},#{args[1]})"
  end
end

- (self) mkdirBlocking(path) - (self) mkdirBlocking(path, perms)

Blocking version of #mkdir

Overloads:

  • - (self) mkdirBlocking(path)

    Parameters:

    • path (String)
  • - (self) mkdirBlocking(path, perms)

    Parameters:

    • path (String)
    • perms (String)

Returns:

  • (self)


441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 441

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

- (self) mkdirs(path, handler) { ... } - (self) mkdirs(path, perms, handler) { ... }

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 path already exists but is not a directory.

Overloads:

  • - (self) mkdirs(path, handler) { ... }

    Parameters:

    • path (String)
      path to the file

    Yields:

    • the handler that will be called on completion
  • - (self) mkdirs(path, perms, handler) { ... }

    Parameters:

    • path (String)
      path to the file
    • perms (String)
      the permissions string

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 493

def mkdirs(*args)
  if args[0].class == String && true && args[1] == nil
    if (block_given?)
      @j_del.java_method(:mkdirs, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:mkdirs, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:mkdirs, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling mkdirs(#{args[0]},#{args[1]})"
  end
end

- (self) mkdirsBlocking(path) - (self) mkdirsBlocking(path, perms)

Blocking version of #mkdirs

Overloads:

  • - (self) mkdirsBlocking(path)

    Parameters:

    • path (String)
  • - (self) mkdirsBlocking(path, perms)

    Parameters:

    • path (String)
    • perms (String)

Returns:

  • (self)


1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1112

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

- (self) move(from, to, handler) { ... } - (self) move(from, to, options, handler) { ... }

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

Overloads:

  • - (self) move(from, to, handler) { ... }

    Parameters:

    • from (String)
      the path to copy from
    • to (String)
      the path to copy to

    Yields:

    • the handler that will be called on completion
  • - (self) move(from, to, options, handler) { ... }

    Parameters:

    • from (String)
      the path to copy from
    • to (String)
      the path to copy to
    • options (Hash{String => Object})
      options describing how the file should be copied

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 949

def move(*args)
  if args[0].class == String && args[1].class == String && true && args[2] == nil
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:move, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && args[2].class == Hash && true
    if (block_given?)
      @j_del.java_method(:move, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreFile::CopyOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:move, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCoreFile::CopyOptions.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object(args[2])),block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling move(#{args[0]},#{args[1]},#{args[2]})"
  end
end

- (self) moveBlocking(from, to)

Blocking version of #move

Parameters:

  • from (String)
  • to (String)

Returns:

  • (self)


559
560
561
562
563
564
565
566
567
568
569
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 559

def move_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given?
    @j_del.java_method(:moveBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling move_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) open(path, options, handler) { ... }

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)
    path to the file
  • options (Hash{String => Object})
    options describing how the file should be opened

Yields:

Returns:

  • (self)


1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1270

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

- (::Vertx::AsyncFile) openBlocking(path, options)

Blocking version of #open

Parameters:

  • path (String)
  • options (Hash{String => Object})

Returns:



376
377
378
379
380
381
382
383
384
385
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 376

def open_blocking(*args)
  if args[0].class == String && args[1].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(args[0],Java::IoVertxCoreFile::OpenOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::Vertx::AsyncFile)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling open_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) props(path, handler) { ... }

Obtain properties for the file represented by path, asynchronously.

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

Parameters:

  • path (String)
    the path to the file

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 417

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

- (::Vertx::FileProps) propsBlocking(path)

Blocking version of #props

Parameters:

  • path (String)

Returns:



1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1130

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

- (self) readDir(path, handler) { ... } - (self) readDir(path, filter, handler) { ... }

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.

Overloads:

  • - (self) readDir(path, handler) { ... }

    Parameters:

    • path (String)
      path to the file

    Yields:

    • the handler that will be called on completion
  • - (self) readDir(path, filter, handler) { ... }

    Parameters:

    • path (String)
      path to the directory
    • filter (String)
      the filter expression

    Yields:

    • the handler that will be called on completion

Returns:

  • (self)


1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1154

def read_dir(*args)
  if args[0].class == String && true && args[1] == nil
    if (block_given?)
      @j_del.java_method(:readDir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:readDir, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  elsif args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:readDir, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling read_dir(#{args[0]},#{args[1]})"
  end
end

- (Array<String>) readDirBlocking(path) - (Array<String>) readDirBlocking(path, filter)

Blocking version of #read_dir

Overloads:

  • - (Array<String>) readDirBlocking(path)

    Parameters:

    • path (String)
  • - (Array<String>) readDirBlocking(path, filter)

    Parameters:

    • path (String)
    • filter (String)

Returns:

  • (Array<String>)


526
527
528
529
530
531
532
533
534
535
536
537
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 526

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

- (self) readFile(path, handler) { ... }

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

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

Parameters:

  • path (String)
    path to the file

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1223

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

- (::Vertx::Buffer) readFileBlocking(path)

Blocking version of #read_file

Parameters:

  • path (String)

Returns:



669
670
671
672
673
674
675
676
677
678
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 669

def read_file_blocking(*args)
  if args[0].class == String && !block_given?
    return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:readFileBlocking, [Java::java.lang.String.java_class]).call(args[0]),::Vertx::Buffer)
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling read_file_blocking(#{args[0]})"
  end
end
Returns the path representing the file that the symbolic link specified by link points to, asynchronously.

Parameters:

  • link (String)
    the link

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 626

def read_symlink(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:readSymlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:readSymlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling read_symlink(#{args[0]})"
  end
end
Blocking version of #read_symlink

Parameters:

  • link (String)

Returns:

  • (String)


93
94
95
96
97
98
99
100
101
102
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 93

def read_symlink_blocking(*args)
  if args[0].class == String && !block_given?
    return @j_del.java_method(:readSymlinkBlocking, [Java::java.lang.String.java_class]).call(args[0])
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling read_symlink_blocking(#{args[0]})"
  end
end
Create a symbolic link on the file system from link to existing, asynchronously.

Parameters:

  • link (String)
    the link
  • existing (String)
    the link destination

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 702

def symlink(*args)
  if args[0].class == String && args[1].class == String && true
    if (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(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:symlink, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling symlink(#{args[0]},#{args[1]})"
  end
end
Blocking version of #link

Parameters:

  • link (String)
  • existing (String)

Returns:

  • (self)


543
544
545
546
547
548
549
550
551
552
553
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 543

def symlink_blocking(*args)
  if args[0].class == String && args[1].class == String && !block_given?
    @j_del.java_method(:symlinkBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling symlink_blocking(#{args[0]},#{args[1]})"
  end
end

- (self) truncate(path, len, handler) { ... }

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)
    the path to the file
  • len (Fixnum)
    the length to truncate it to

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 146

def truncate(*args)
  if args[0].class == String && args[1].class == Fixnum && true
    if (block_given?)
      @j_del.java_method(:truncate, [Java::java.lang.String.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:truncate, [Java::java.lang.String.java_class,Java::long.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling truncate(#{args[0]},#{args[1]})"
  end
end

- (self) truncateBlocking(path, len)

Blocking version of #truncate

Parameters:

  • path (String)
  • len (Fixnum)

Returns:

  • (self)


1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1094

def truncate_blocking(*args)
  if args[0].class == String && args[1].class == Fixnum && !block_given?
    @j_del.java_method(:truncateBlocking, [Java::java.lang.String.java_class,Java::long.java_class]).call(args[0],args[1])
    return self
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling truncate_blocking(#{args[0]},#{args[1]})"
  end
end
Unlinks the link on the file system represented by the path link, asynchronously.

Parameters:

  • link (String)
    the link

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1185

def unlink(*args)
  if args[0].class == String && true
    if (block_given?)
      @j_del.java_method(:unlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:unlink, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling unlink(#{args[0]})"
  end
end
Blocking version of #unlink

Parameters:

  • link (String)

Returns:

  • (self)


296
297
298
299
300
301
302
303
304
305
306
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 296

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

- (self) writeFile(path, data, handler) { ... }

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

Parameters:

Yields:

  • the handler that will be called on completion

Returns:

  • (self)


860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 860

def write_file(*args)
  if args[0].class == String && args[1].class.method_defined?(:j_del) && true
    if (block_given?)
      @j_del.java_method(:writeFile, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1].j_del,block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return self
    else
      promise = ::Vertx::Util::Utils.promise
      @j_del.java_method(:writeFile, [Java::java.lang.String.java_class,Java::IoVertxCoreBuffer::Buffer.java_class,Java::IoVertxCore::Handler.java_class]).call(args[0],args[1].j_del,block_given? ? Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? nil : nil) } : promise)
      return ::Vertx::Util::Utils.safe_create(promise.future(),::Vertx::Future, nil)
    end
  end
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling write_file(#{args[0]},#{args[1]})"
  end
end

- (self) writeFileBlocking(path, data)

Blocking version of #write_file

Parameters:

Returns:

  • (self)


1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 1062

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