4static VALUE rb_cPathname;
12static ID id_birthtime;
13static ID id_blockdev_p;
14static ID id_chardev_p;
18static ID id_directory_p;
22static ID id_executable_p;
23static ID id_executable_real_p;
25static ID id_expand_path;
33static ID id_grpowned_p;
44static ID id_readable_p;
45static ID id_readable_real_p;
46static ID id_readlines;
48static ID id_realdirpath;
62static ID id_symlink_p;
68static ID id_world_readable_p;
69static ID id_world_writable_p;
70static ID id_writable_p;
71static ID id_writable_real_p;
112 set_strpath(
self,
str);
125path_freeze(
VALUE self)
139path_taint(
VALUE self)
141 rb_warning(
"Pathname#taint is deprecated and will be removed in Ruby 3.2.");
152path_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))
247path_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);
502path_atime(
VALUE self)
507#if defined(HAVE_RB_FILE_S_BIRTHTIME)
524# define path_birthtime rb_f_notimplement
536path_ctime(
VALUE self)
550path_mtime(
VALUE self)
624 VALUE pattern, flags;
640path_ftype(
VALUE self)
670 args[0] = get_strpath(
self);
686path_readlink(
VALUE self)
719path_lstat(
VALUE self)
783path_dirname(
VALUE self)
796path_extname(
VALUE self)
825path_split(
VALUE self)
842path_blockdev_p(
VALUE self)
851path_chardev_p(
VALUE self)
860path_executable_p(
VALUE self)
869path_executable_real_p(
VALUE self)
878path_exist_p(
VALUE self)
887path_grpowned_p(
VALUE self)
896path_directory_p(
VALUE self)
905path_file_p(
VALUE self)
914path_pipe_p(
VALUE self)
923path_socket_p(
VALUE self)
932path_owned_p(
VALUE self)
941path_readable_p(
VALUE self)
950path_world_readable_p(
VALUE self)
959path_readable_real_p(
VALUE self)
968path_setuid_p(
VALUE self)
977path_setgid_p(
VALUE self)
995path_size_p(
VALUE self)
1004path_sticky_p(
VALUE self)
1013path_symlink_p(
VALUE self)
1022path_writable_p(
VALUE self)
1031path_world_writable_p(
VALUE self)
1040path_writable_real_p(
VALUE self)
1049path_zero_p(
VALUE self)
1060path_empty_p(
VALUE self)
1199path_entries(
VALUE self)
1204 str = get_strpath(
self);
1237path_rmdir(
VALUE self)
1248path_opendir(
VALUE self)
1252 args[0] = get_strpath(
self);
1267path_each_entry(
VALUE self)
1271 args[0] = get_strpath(
self);
1292path_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?");
rb_encoding * rb_enc_get(VALUE obj)
char str[HTML_ESCAPE_MAX_LEN+1]
const char * ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
void rb_undef_method(VALUE, const char *)
int rb_block_given_p(void)
Determines if the current method is given a block.
VALUE rb_cObject
Object class.
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_rescue2(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE, VALUE), VALUE,...)
An equivalent of rescue clause.
VALUE rb_convert_type(VALUE, int, const char *, const char *)
Converts an object into another type.
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
VALUE rb_obj_dup(VALUE)
Equivalent to Object#dup in Ruby.
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Determines if obj is a kind of c.
void InitVM_pathname(void)