4 static VALUE rb_cPathname;
11 static ID id_binwrite;
12 static ID id_birthtime;
13 static ID id_blockdev_p;
14 static ID id_chardev_p;
18 static ID id_directory_p;
22 static ID id_executable_p;
23 static ID id_executable_real_p;
25 static ID id_expand_path;
33 static ID id_grpowned_p;
44 static ID id_readable_p;
45 static ID id_readable_real_p;
46 static ID id_readlines;
47 static ID id_readlink;
48 static ID id_realdirpath;
49 static ID id_realpath;
52 static ID id_setgid_p;
53 static ID id_setuid_p;
56 static ID id_socket_p;
59 static ID id_sticky_p;
62 static ID id_symlink_p;
65 static ID id_truncate;
68 static ID id_world_readable_p;
69 static ID id_world_writable_p;
70 static ID id_writable_p;
71 static ID id_writable_real_p;
112 set_strpath(
self,
str);
125 path_freeze(
VALUE self)
139 path_taint(
VALUE self)
141 rb_warning(
"Pathname#taint is deprecated and will be removed in Ruby 3.2.");
152 path_untaint(
VALUE self)
154 rb_warning(
"Pathname#untaint is deprecated and will be removed in Ruby 3.2.");
168 return rb_str_equal(get_strpath(
self), get_strpath(other));
193 s1 = get_strpath(
self);
194 s2 = get_strpath(other);
199 while (p1 < e1 && p2 < e2) {
201 c1 = (
unsigned char)*p1++;
202 c2 = (
unsigned char)*p2++;
203 if (c1 ==
'/') c1 =
'\0';
204 if (c2 ==
'/') c2 =
'\0';
220 #define ST2FIX(h) LONG2FIX((long)(h))
225 path_hash(
VALUE self)
240 path_to_s(
VALUE self)
247 path_inspect(
VALUE self)
299 else if (extlen <= 1) {
360 args[0] = get_strpath(
self);
386 args[0] = get_strpath(
self);
406 args[0] = get_strpath(
self);
427 args[0] = get_strpath(
self);
448 args[0] = get_strpath(
self);
470 args[0] = get_strpath(
self);
488 args[0] = get_strpath(
self);
502 path_atime(
VALUE self)
507 #if defined(HAVE_RB_FILE_S_BIRTHTIME)
524 # define path_birthtime rb_f_notimplement
536 path_ctime(
VALUE self)
550 path_mtime(
VALUE self)
624 VALUE pattern, flags;
640 path_ftype(
VALUE self)
670 args[0] = get_strpath(
self);
686 path_readlink(
VALUE self)
710 path_stat(
VALUE self)
719 path_lstat(
VALUE self)
783 path_dirname(
VALUE self)
796 path_extname(
VALUE self)
825 path_split(
VALUE self)
842 path_blockdev_p(
VALUE self)
851 path_chardev_p(
VALUE self)
860 path_executable_p(
VALUE self)
869 path_executable_real_p(
VALUE self)
878 path_exist_p(
VALUE self)
887 path_grpowned_p(
VALUE self)
896 path_directory_p(
VALUE self)
905 path_file_p(
VALUE self)
914 path_pipe_p(
VALUE self)
923 path_socket_p(
VALUE self)
932 path_owned_p(
VALUE self)
941 path_readable_p(
VALUE self)
950 path_world_readable_p(
VALUE self)
959 path_readable_real_p(
VALUE self)
968 path_setuid_p(
VALUE self)
977 path_setgid_p(
VALUE self)
986 path_size(
VALUE self)
995 path_size_p(
VALUE self)
1004 path_sticky_p(
VALUE self)
1013 path_symlink_p(
VALUE self)
1022 path_writable_p(
VALUE self)
1031 path_world_writable_p(
VALUE self)
1040 path_writable_real_p(
VALUE self)
1049 path_zero_p(
VALUE self)
1060 path_empty_p(
VALUE self)
1199 path_entries(
VALUE self)
1204 str = get_strpath(
self);
1237 path_rmdir(
VALUE self)
1248 path_opendir(
VALUE self)
1252 args[0] = get_strpath(
self);
1267 path_each_entry(
VALUE self)
1271 args[0] = get_strpath(
self);
1292 path_unlink(
VALUE self)
1560 rb_define_method(rb_cPathname,
"executable_real?", path_executable_real_p, 0);
1569 rb_define_method(rb_cPathname,
"world_readable?", path_world_readable_p, 0);
1578 rb_define_method(rb_cPathname,
"world_writable?", path_world_writable_p, 0);
1615 id_directory_p =
rb_intern(
"directory?");
1619 id_executable_p =
rb_intern(
"executable?");
1620 id_executable_real_p =
rb_intern(
"executable_real?");
1622 id_expand_path =
rb_intern(
"expand_path");
1642 id_readable_real_p =
rb_intern(
"readable_real?");
1645 id_realdirpath =
rb_intern(
"realdirpath");
1664 id_world_readable_p =
rb_intern(
"world_readable?");
1665 id_world_writable_p =
rb_intern(
"world_writable?");
1667 id_writable_real_p =
rb_intern(
"writable_real?");