Class: Vertx::FileSystem
- Inherits:
-
Object
- Object
- Vertx::FileSystem
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb
Overview
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, options = 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) create_temp_directory(dir = nil, prefix = nil, perms = nil) { ... }
Creates a new directory in the directory provided by the path path, using the given prefix to generate its name, asynchronously.
-
- (String) create_temp_directory_blocking(dir = nil, prefix = nil, perms = nil)
Blocking version of #create_temp_directory.
-
- (self) create_temp_file(dir = nil, prefix = nil, suffix = nil, perms = nil) { ... }
Creates a new file in the directory provided by the path dir, using the given prefix and suffix to generate its name, asynchronously.
-
- (String) create_temp_file_blocking(dir = nil, prefix = nil, suffix = nil, perms = nil)
Blocking version of #create_temp_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, options = 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)
33 34 35 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 33 def @@j_api_type.accept?(obj) obj.class == FileSystem end |
+ (Object) j_api_type
42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 42 def self.j_api_type @@j_api_type end |
+ (Object) j_class
45 46 47 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 45 def self.j_class Java::IoVertxCoreFile::FileSystem.java_class end |
+ (Object) unwrap(obj)
39 40 41 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 39 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
36 37 38 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 36 def @@j_api_type.wrap(obj) FileSystem.new(obj) end |
Instance Method Details
- (self) chmod(path = nil, perms = nil) { ... }
path to perms, asynchronously.
The permission String takes the form rwxr-x--- as specified here.
165 166 167 168 169 170 171 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 165 def chmod(path=nil,perms=nil) if path.class == String && perms.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling chmod(#{path},#{perms})" end |
- (self) chmod_blocking(path = nil, perms = nil)
176 177 178 179 180 181 182 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 176 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) { ... }
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.
194 195 196 197 198 199 200 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 194 def chmod_recursive(path=nil,perms=nil,dirPerms=nil) if path.class == String && perms.class == String && dirPerms.class == String && true @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) } unless !block_given?)) 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)
206 207 208 209 210 211 212 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 206 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) { ... }
path to user and group, asynchronously.
219 220 221 222 223 224 225 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 219 def chown(path=nil,user=nil,group=nil) if path.class == String && user.class == String && group.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling chown(#{path},#{user},#{group})" end |
- (self) chown_blocking(path = nil, user = nil, group = nil)
232 233 234 235 236 237 238 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 232 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, options = nil) { ... }
from to path to, asynchronously.
54 55 56 57 58 59 60 61 62 63 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 54 def copy(from=nil,to=nil,=nil) if from.class == String && to.class == String && true && == nil @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) } unless !block_given?)) return self elsif from.class == String && to.class == String && .class == Hash && true @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(from,to,Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling copy(#{from},#{to},#{})" end |
- (self) copy_blocking(from = nil, to = nil)
68 69 70 71 72 73 74 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 68 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) { ... }
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.
86 87 88 89 90 91 92 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 86 def copy_recursive(from=nil,to=nil,recursive=nil) if from.class == String && to.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && true @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) } unless !block_given?)) 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)
98 99 100 101 102 103 104 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 98 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) { ... }
path and permissions perms, asynchronously.
596 597 598 599 600 601 602 603 604 605 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 596 def create_file(path=nil,perms=nil) if path.class == String && true && 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) } unless !block_given?)) return self elsif path.class == String && perms.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling create_file(#{path},#{perms})" end |
- (self) create_file_blocking(path = nil, perms = nil)
610 611 612 613 614 615 616 617 618 619 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 610 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) create_temp_directory(dir = nil, prefix = nil, perms = nil) { ... }
path, using the given
prefix to generate its name, asynchronously.
The new directory will be created with permissions as specified by perms.
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.
678 679 680 681 682 683 684 685 686 687 688 689 690 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 678 def create_temp_directory(dir=nil,prefix=nil,perms=nil) if dir.class == String && true && prefix == nil && perms == nil @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(dir,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self elsif dir.class == String && prefix.class == String && true && perms == nil @j_del.java_method(:createTempDirectory, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(dir,prefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self elsif dir.class == String && prefix.class == String && perms.class == String && true @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(dir,prefix,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling create_temp_directory(#{dir},#{prefix},#{perms})" end |
- (String) create_temp_directory_blocking(dir = nil, prefix = nil, perms = nil)
696 697 698 699 700 701 702 703 704 705 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 696 def create_temp_directory_blocking(dir=nil,prefix=nil,perms=nil) if dir.class == String && !block_given? && prefix == nil && perms == nil return @j_del.java_method(:createTempDirectoryBlocking, [Java::java.lang.String.java_class]).call(dir) elsif dir.class == String && prefix.class == String && !block_given? && perms == nil return @j_del.java_method(:createTempDirectoryBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(dir,prefix) elsif dir.class == String && prefix.class == String && perms.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(dir,prefix,perms) end raise ArgumentError, "Invalid arguments when calling create_temp_directory_blocking(#{dir},#{prefix},#{perms})" end |
- (self) create_temp_file(dir = nil, prefix = nil, suffix = nil, perms = nil) { ... }
dir, using the given
prefix and suffix to generate its name, asynchronously.
The new directory will be created with permissions as specified by perms.
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.
725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 725 def create_temp_file(dir=nil,prefix=nil,suffix=nil,perms=nil) if dir.class == String && prefix.class == String && true && suffix == nil && perms == nil @j_del.java_method(:createTempFile, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(dir,prefix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self elsif dir.class == String && prefix.class == String && suffix.class == String && true && perms == nil @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(dir,prefix,suffix,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self elsif dir.class == String && prefix.class == String && suffix.class == String && perms.class == String && true @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(dir,prefix,suffix,perms,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling create_temp_file(#{dir},#{prefix},#{suffix},#{perms})" end |
- (String) create_temp_file_blocking(dir = nil, prefix = nil, suffix = nil, perms = nil)
744 745 746 747 748 749 750 751 752 753 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 744 def create_temp_file_blocking(dir=nil,prefix=nil,suffix=nil,perms=nil) if dir.class == String && prefix.class == String && !block_given? && suffix == nil && perms == nil return @j_del.java_method(:createTempFileBlocking, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(dir,prefix) elsif dir.class == String && prefix.class == String && suffix.class == String && !block_given? && perms == 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(dir,prefix,suffix) elsif dir.class == String && prefix.class == String && suffix.class == String && perms.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(dir,prefix,suffix,perms) end raise ArgumentError, "Invalid arguments when calling create_temp_file_blocking(#{dir},#{prefix},#{suffix},#{perms})" end |
- (self) delete(path = nil) { ... }
path, asynchronously.
374 375 376 377 378 379 380 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 374 def delete(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling delete(#{path})" end |
- (self) delete_blocking(path = nil)
384 385 386 387 388 389 390 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 384 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) { ... }
path, asynchronously.
If the path represents a directory and recursive = true then the directory and its contents will be
deleted recursively.
399 400 401 402 403 404 405 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 399 def delete_recursive(path=nil,recursive=nil) if path.class == String && (recursive.class == TrueClass || recursive.class == FalseClass) && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling delete_recursive(#{path},#{recursive})" end |
- (self) delete_recursive_blocking(path = nil, recursive = nil)
410 411 412 413 414 415 416 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 410 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) { ... }
path exists, asynchronously.
624 625 626 627 628 629 630 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 624 def exists(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling exists(#{path})" end |
- (true, false) exists_blocking?(path = nil)
634 635 636 637 638 639 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 634 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) { ... }
path, asynchronously.
644 645 646 647 648 649 650 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 644 def fs_props(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling fs_props(#{path})" end |
- (::Vertx::FileSystemProps) fs_props_blocking(path = nil)
654 655 656 657 658 659 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 654 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) { ... }
link to existing, asynchronously.
288 289 290 291 292 293 294 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 288 def link(link=nil,existing=nil) if link.class == String && existing.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling link(#{link},#{existing})" end |
- (self) link_blocking(link = nil, existing = nil)
299 300 301 302 303 304 305 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 299 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) { ... }
path, asynchronously.
The link will not be followed.
267 268 269 270 271 272 273 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 267 def lprops(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling lprops(#{path})" end |
- (::Vertx::FileProps) lprops_blocking(path = nil)
277 278 279 280 281 282 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 277 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) { ... }
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.
429 430 431 432 433 434 435 436 437 438 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 429 def mkdir(path=nil,perms=nil) if path.class == String && true && 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) } unless !block_given?)) return self elsif path.class == String && perms.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling mkdir(#{path},#{perms})" end |
- (self) mkdir_blocking(path = nil, perms = nil)
443 444 445 446 447 448 449 450 451 452 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 443 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) { ... }
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.
465 466 467 468 469 470 471 472 473 474 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 465 def mkdirs(path=nil,perms=nil) if path.class == String && true && 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) } unless !block_given?)) return self elsif path.class == String && perms.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling mkdirs(#{path},#{perms})" end |
- (self) mkdirs_blocking(path = nil, perms = nil)
479 480 481 482 483 484 485 486 487 488 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 479 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, options = nil) { ... }
from to path to, asynchronously.
111 112 113 114 115 116 117 118 119 120 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 111 def move(from=nil,to=nil,=nil) if from.class == String && to.class == String && true && == nil @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) } unless !block_given?)) return self elsif from.class == String && to.class == String && .class == Hash && true @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(from,to,Java::IoVertxCoreFile::CopyOptions.new(::Vertx::Util::Utils.to_json_object()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling move(#{from},#{to},#{})" end |
- (self) move_blocking(from = nil, to = nil)
125 126 127 128 129 130 131 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 125 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) { ... }
path, asynchronously.
The file is opened for both reading and writing. If the file does not already exist it will be created.
574 575 576 577 578 579 580 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 574 def open(path=nil,=nil) if path.class == String && .class == Hash && true @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()),(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::Vertx::AsyncFile) : nil) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling open(#{path},#{})" end |
- (::Vertx::AsyncFile) open_blocking(path = nil, options = nil)
585 586 587 588 589 590 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 585 def open_blocking(path=nil,=nil) if path.class == String && .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())),::Vertx::AsyncFile) end raise ArgumentError, "Invalid arguments when calling open_blocking(#{path},#{})" end |
- (self) props(path = nil) { ... }
path, asynchronously.
If the file is a link, the link will be followed.
245 246 247 248 249 250 251 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 245 def props(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling props(#{path})" end |
- (::Vertx::FileProps) props_blocking(path = nil)
255 256 257 258 259 260 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 255 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) { ... }
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.
499 500 501 502 503 504 505 506 507 508 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 499 def read_dir(path=nil,filter=nil) if path.class == String && true && 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) } unless !block_given?)) return self elsif path.class == String && filter.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling read_dir(#{path},#{filter})" end |
- (Array<String>) read_dir_blocking(path = nil, filter = nil)
513 514 515 516 517 518 519 520 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 513 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) { ... }
path as a , asynchronously.
Do not use this method to read very large files or you risk running out of available RAM.
527 528 529 530 531 532 533 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 527 def read_file(path=nil) if path.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling read_file(#{path})" end |
- (::Vertx::Buffer) read_file_blocking(path = nil)
537 538 539 540 541 542 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 537 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) { ... }
link points to, asynchronously.
354 355 356 357 358 359 360 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 354 def read_symlink(link=nil) if link.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling read_symlink(#{link})" end |
- (String) read_symlink_blocking(link = nil)
364 365 366 367 368 369 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 364 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) { ... }
link to existing, asynchronously.
311 312 313 314 315 316 317 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 311 def symlink(link=nil,existing=nil) if link.class == String && existing.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling symlink(#{link},#{existing})" end |
- (self) symlink_blocking(link = nil, existing = nil)
322 323 324 325 326 327 328 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 322 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) { ... }
path to length len in bytes, asynchronously.
The operation will fail if the file does not exist or len is less than zero.
139 140 141 142 143 144 145 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 139 def truncate(path=nil,len=nil) if path.class == String && len.class == Fixnum && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling truncate(#{path},#{len})" end |
- (self) truncate_blocking(path = nil, len = nil)
150 151 152 153 154 155 156 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 150 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) { ... }
link, asynchronously.
333 334 335 336 337 338 339 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 333 def unlink(link=nil) if link.class == String && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling unlink(#{link})" end |
- (self) unlink_blocking(link = nil)
343 344 345 346 347 348 349 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 343 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) { ... }
Buffer data to the file represented by the path path,
asynchronously.
549 550 551 552 553 554 555 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 549 def write_file(path=nil,data=nil) if path.class == String && data.class.method_defined?(:j_del) && true @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) } unless !block_given?)) return self end raise ArgumentError, "Invalid arguments when calling write_file(#{path},#{data})" end |
- (self) write_file_blocking(path = nil, data = nil)
560 561 562 563 564 565 566 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/file_system.rb', line 560 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 |