Class: RFuse::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/rfuse.rb,
ext/rfuse/context.c,
ext/rfuse/context.c

Overview

Context object passed to every fuse operation

Instance Method Summary collapse

Instance Method Details

#fuseFuse

Returns the fuse object.

Returns:

  • (Fuse)

    the fuse object



57
58
59
60
61
# File 'ext/rfuse/context.c', line 57

VALUE context_fuse(VALUE self) {
  struct fuse_context *ctx;
  Data_Get_Struct(self,struct fuse_context,ctx);
  return (VALUE) ctx->private_data;
}

#gidInteger

Returns Group id of the caller.

Returns:

  • (Integer)

    Group id of the caller



39
40
41
42
43
# File 'ext/rfuse/context.c', line 39

VALUE context_gid(VALUE self){
  struct fuse_context *ctx;
  Data_Get_Struct(self,struct fuse_context,ctx);
  return INT2FIX(ctx->gid);
}

#pidInteger

Returns Process id of the calling process.

Returns:

  • (Integer)

    Process id of the calling process



48
49
50
51
52
# File 'ext/rfuse/context.c', line 48

VALUE context_pid(VALUE self){
  struct fuse_context *ctx;
  Data_Get_Struct(self,struct fuse_context,ctx);
  return INT2FIX(ctx->pid);
}

#uidInteger

Returns User id of the caller.

Returns:

  • (Integer)

    User id of the caller



30
31
32
33
34
# File 'ext/rfuse/context.c', line 30

VALUE context_uid(VALUE self){
  struct fuse_context *ctx;
  Data_Get_Struct(self,struct fuse_context,ctx);
  return INT2FIX(ctx->uid);
}