Class: Net::SMB::DirEntry

Inherits:
Hash
  • Object
show all
Defined in:
ext/net_smb/smbdirentry.c

Instance Method Summary collapse

Constructor Details

#initialize(name_obj, type_obj, url_obj, comment_obj) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'ext/net_smb/smbdirentry.c', line 31

static VALUE rb_smbdirentry_initialize(VALUE self,
    VALUE name_obj, VALUE type_obj, VALUE url_obj, VALUE comment_obj)
{
  rb_call_super(0, 0);

  rb_hash_aset(self, sym_name, name_obj);
  rb_hash_aset(self, sym_type, type_obj);
  rb_hash_aset(self, sym_url, url_obj);
  rb_hash_aset(self, sym_comment, comment_obj);

  return self;
}

Instance Method Details

#commentObject



59
60
61
62
# File 'ext/net_smb/smbdirentry.c', line 59

static VALUE rb_smbdirentry_comment(VALUE self)
{
  return rb_hash_lookup(self, sym_comment);
}

#comms_share?Boolean

Returns:

  • (Boolean)


88
89
90
91
92
# File 'ext/net_smb/smbdirentry.c', line 88

static VALUE rb_smbdirentry_comms_share_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_COMMS_SHARE) ?
      Qtrue : Qfalse;
}

#directory?Boolean Also known as: dir?

Returns:

  • (Boolean)


100
101
102
103
104
# File 'ext/net_smb/smbdirentry.c', line 100

static VALUE rb_smbdirentry_dir_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_DIR) ?
      Qtrue : Qfalse;
}

#file?Boolean

Returns:

  • (Boolean)


106
107
108
109
110
# File 'ext/net_smb/smbdirentry.c', line 106

static VALUE rb_smbdirentry_file_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_FILE) ?
      Qtrue : Qfalse;
}

#file_share?Boolean

Returns:

  • (Boolean)


76
77
78
79
80
# File 'ext/net_smb/smbdirentry.c', line 76

static VALUE rb_smbdirentry_file_share_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_FILE_SHARE) ?
      Qtrue : Qfalse;
}

#ipc_share?Boolean

Returns:

  • (Boolean)


94
95
96
97
98
# File 'ext/net_smb/smbdirentry.c', line 94

static VALUE rb_smbdirentry_ipc_share_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_IPC_SHARE) ?
      Qtrue : Qfalse;
}

#link?Boolean

Returns:

  • (Boolean)


112
113
114
115
116
# File 'ext/net_smb/smbdirentry.c', line 112

static VALUE rb_smbdirentry_link_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_LINK) ?
      Qtrue : Qfalse;
}

#nameObject Also known as: to_s



44
45
46
47
# File 'ext/net_smb/smbdirentry.c', line 44

static VALUE rb_smbdirentry_name(VALUE self)
{
  return rb_hash_lookup(self, sym_name);
}

#printer_share?Boolean

Returns:

  • (Boolean)


82
83
84
85
86
# File 'ext/net_smb/smbdirentry.c', line 82

static VALUE rb_smbdirentry_printer_share_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_PRINTER_SHARE) ?
      Qtrue : Qfalse;
}

#server?Boolean

Returns:

  • (Boolean)


70
71
72
73
74
# File 'ext/net_smb/smbdirentry.c', line 70

static VALUE rb_smbdirentry_server_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_SERVER) ?
      Qtrue : Qfalse;
}

#typeObject



49
50
51
52
# File 'ext/net_smb/smbdirentry.c', line 49

static VALUE rb_smbdirentry_type(VALUE self)
{
  return rb_hash_lookup(self, sym_type);
}

#urlObject



54
55
56
57
# File 'ext/net_smb/smbdirentry.c', line 54

static VALUE rb_smbdirentry_url(VALUE self)
{
  return rb_hash_lookup(self, sym_url);
}

#workgroup?Boolean

Returns:

  • (Boolean)


64
65
66
67
68
# File 'ext/net_smb/smbdirentry.c', line 64

static VALUE rb_smbdirentry_workgroup_p(VALUE self)
{
  return rb_hash_lookup(self, sym_type) == INT2FIX(SMBC_WORKGROUP) ?
      Qtrue : Qfalse;
}