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, perms, handler) { ... }
Change the permissions on the file represented by path to perms, asynchronously.
-
- (self) chmodBlocking(path, perms)
Blocking version of String, Handler).
-
- (self) chmodRecursive(path, perms, dirPerms, handler) { ... }
Change the permissions on the file represented by path to perms, asynchronously.
-
- (self) chmodRecursiveBlocking(path, perms, dirPerms)
Blocking version of #chmod_recursive.
-
- (self) chown(path, user, group, handler) { ... }
Change the ownership on the file represented by path to user and group, asynchronously.
-
- (self) chownBlocking(path, user, group)
Blocking version of.
-
- (self) copy(*args)
Copy a file from the path from to path to, asynchronously.
-
- (self) copyBlocking(from, to)
Blocking version of #copy.
-
- (self) copyRecursive(from, to, recursive, handler) { ... }
Copy a file from the path from to path to, asynchronously.
-
- (self) copyRecursiveBlocking(from, to, recursive)
Blocking version of #copy_recursive.
-
- (self) create_file(*args)
Creates an empty file with the specified path and permissions perms, asynchronously.
-
- (self) create_file_blocking(*args)
Blocking version of #create_file.
-
- (self) create_temp_directory(*args)
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(*args)
Blocking version of #create_temp_directory.
-
- (self) create_temp_file(*args)
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(*args)
Blocking version of #create_temp_file.
-
- (self) delete(path, handler) { ... }
Deletes the file represented by the specified path, asynchronously.
-
- (self) deleteBlocking(path)
Blocking version of #delete.
-
- (self) deleteRecursive(path, recursive, handler) { ... }
Deletes the file represented by the specified path, asynchronously.
-
- (self) deleteRecursiveBlocking(path, recursive)
Blocking version of #delete_recursive.
-
- (self) exists(path, handler) { ... }
Determines whether the file as specified by the path path exists, asynchronously.
-
- (true, false) existsBlocking(path)
Blocking version of #exists.
-
- (self) fsProps(path, handler) { ... }
Returns properties of the file-system being used by the specified path, asynchronously.
-
- (::Vertx::FileSystemProps) fsPropsBlocking(path)
Blocking version of #fs_props.
-
- (self) link(link, existing, handler) { ... }
Create a hard link on the file system from link to existing, asynchronously.
-
- (self) linkBlocking(link, existing)
Blocking version of #link.
-
- (self) lprops(path, handler) { ... }
Obtain properties for the link represented by path, asynchronously.
-
- (::Vertx::FileProps) lpropsBlocking(path)
Blocking version of #lprops.
-
- (self) mkdir(*args)
Create the directory represented by path, asynchronously.
-
- (self) mkdir_blocking(*args)
Blocking version of #mkdir.
-
- (self) mkdirs(*args)
Create the directory represented by path and any non existent parents, asynchronously.
-
- (self) mkdirs_blocking(*args)
Blocking version of #mkdirs.
-
- (self) move(*args)
Move a file from the path from to path to, asynchronously.
-
- (self) moveBlocking(from, to)
Blocking version of #move.
-
- (self) open(path, options, handler) { ... }
Open the file represented by path, asynchronously.
-
- (::Vertx::AsyncFile) openBlocking(path, options)
Blocking version of #open.
-
- (self) props(path, handler) { ... }
Obtain properties for the file represented by path, asynchronously.
-
- (::Vertx::FileProps) propsBlocking(path)
Blocking version of #props.
-
- (self) read_dir(*args)
Read the contents of the directory specified by path, asynchronously.
-
- (Array<String>) read_dir_blocking(*args)
Blocking version of #read_dir.
-
- (self) readFile(path, handler) { ... }
Reads the entire file as represented by the path path as a , asynchronously.
-
- (::Vertx::Buffer) readFileBlocking(path)
Blocking version of #read_file.
-
- (self) readSymlink(link, handler) { ... }
Returns the path representing the file that the symbolic link specified by link points to, asynchronously.
-
- (String) readSymlinkBlocking(link)
Blocking version of #read_symlink.
-
- (self) symlink(link, existing, handler) { ... }
Create a symbolic link on the file system from link to existing, asynchronously.
-
- (self) symlinkBlocking(link, existing)
Blocking version of #link.
-
- (self) truncate(path, len, handler) { ... }
Truncate the file represented by path to length len in bytes, asynchronously.
-
- (self) truncateBlocking(path, len)
Blocking version of #truncate.
-
- (self) unlink(link, handler) { ... }
Unlinks the link on the file system represented by the path link, asynchronously.
-
- (self) unlinkBlocking(link)
Blocking version of #unlink.
-
- (self) writeFile(path, data, handler) { ... }
Creates the file, and writes the specified Buffer data to the file represented by the path path, asynchronously.
-
- (self) writeFileBlocking(path, data)
Blocking version of #write_file.
Class Method Details
+ (Boolean) accept?(obj)
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) { ... }
path
to perms
, asynchronously.
The permission String takes the form rwxr-x--- as specified here.
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)
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) { ... }
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
.
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)
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) { ... }
path
to user
and group, asynchronously.
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)
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) { ... }
from
to path to
, asynchronously.
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)
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) { ... }
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.
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)
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) { ... }
path
and permissions perms
, asynchronously.
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)
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) { ... }
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.
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)
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) { ... }
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.
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)
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) { ... }
path
, asynchronously.
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)
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) { ... }
path
, asynchronously.
If the path represents a directory and recursive = true
then the directory and its contents will be
deleted recursively.
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)
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) { ... }
path
exists, asynchronously.
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)
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) { ... }
path
, asynchronously.
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)
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 |
- (self) link(link, existing, handler) { ... }
link
to existing
, asynchronously.
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 |
- (self) linkBlocking(link, existing)
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) { ... }
path
, asynchronously.
The link will not be followed.
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)
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) { ... }
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.
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)
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) { ... }
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.
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)
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) { ... }
from
to path to
, asynchronously.
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)
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) { ... }
path
, asynchronously.
The file is opened for both reading and writing. If the file does not already exist it will be created.
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)
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) { ... }
path
, asynchronously.
If the file is a link, the link will be followed.
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)
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) { ... }
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.
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)
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) { ... }
path
as a , asynchronously.
Do not use this method to read very large files or you risk running out of available RAM.
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)
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 |
- (self) readSymlink(link, handler) { ... }
link
points to, asynchronously.
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 |
- (String) readSymlinkBlocking(link)
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 |
- (self) symlink(link, existing, handler) { ... }
link
to existing
, asynchronously.
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 |
- (self) symlinkBlocking(link, existing)
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) { ... }
path
to length len
in bytes, asynchronously.
The operation will fail if the file does not exist or len
is less than zero
.
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)
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 |
- (self) unlink(link, handler) { ... }
link
, asynchronously.
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 |
- (self) unlinkBlocking(link)
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) { ... }
Buffer data
to the file represented by the path path
,
asynchronously.
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)
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 |