org.jruby
Class RubyFile

java.lang.Object
  extended byorg.jruby.RubyObject
      extended byorg.jruby.RubyIO
          extended byorg.jruby.RubyFile
All Implemented Interfaces:
java.lang.Cloneable, IRubyObject

public class RubyFile
extends RubyIO

Ruby File class equivalent in java.

Version:
$Revision: 1.11 $
Author:
jpetersen

Field Summary
protected  java.lang.String path
           
 
Fields inherited from class org.jruby.RubyIO
fileno, handler, ioHandlers, isOpen, lineNumber, modes, STDERR, STDIN, STDOUT
 
Fields inherited from class org.jruby.RubyObject
runtime
 
Fields inherited from interface org.jruby.runtime.builtin.IRubyObject
NULL_ARRAY
 
Constructor Summary
RubyFile(Ruby ruby, RubyClass type)
           
RubyFile(Ruby ruby, java.lang.String path)
           
 
Method Summary
static RubyString basename(IRubyObject recv, IRubyObject[] args)
           
static IRubyObject chmod(IRubyObject recv, RubyInteger mode, IRubyObject[] names)
           
static RubyClass createFileClass(Ruby ruby)
           
static RubyString dirname(IRubyObject recv, RubyString filename)
           
static IRubyObject expand_path(IRubyObject recv, IRubyObject[] args)
           
 IRubyObject initialize(IRubyObject[] args)
           
static RubyString join(IRubyObject recv, IRubyObject[] args)
           
static IRubyObject lstat(IRubyObject recv, RubyString name)
           
static IRubyObject newInstance(IRubyObject recv, IRubyObject[] args)
          rb_io_s_new
static IRubyObject open(IRubyObject recv, IRubyObject[] args)
           
static IRubyObject open(IRubyObject recv, IRubyObject[] args, boolean tryToYield)
           
protected  void openInternal(java.lang.String path, java.lang.String mode)
           
static IRubyObject rename(IRubyObject recv, IRubyObject oldName, IRubyObject newName)
           
 java.lang.String toString()
           
static IRubyObject unlink(IRubyObject recv, IRubyObject[] args)
           
 
Methods inherited from class org.jruby.RubyIO
addString, checkReadable, checkWriteable, clone_IO, close, closed, createIOClass, each_byte, each_line, eof, fdOpen, fileno, finalize, flush, foreach, fsync, getc, getInStream, getIOHandlerByFileno, getNewFileno, getOutStream, gets, initialize, internalGets, isOpen, lineno_set, lineno, pid, pos_set, pos, print, printf, putc, puts, read, readchar, readline, readlines, readlines, registerIOHandler, reopen, rewind, seek, sync_set, sync, sysread, syswrite, ungetc, unregisterIOHandler, write
 
Methods inherited from class org.jruby.RubyObject
argCount, asSymbol, callbackFactory, callInit, callMethod, callMethod, callMethod, checkSafeString, convertToString, convertToType, convertType, createObjectClass, defineSingletonMethod, display, dup, equal, equals, eval, eval, evalUnder, extend, extendObject, freeze, frozen, getInstanceVariable, getInstanceVariables, getJavaClass, getMetaClass, getRuntime, getSingletonClass, getType, hash, hashCode, hasInstanceVariable, id, infectBy, inspect, instance_eval, instance_of, instance_variables, instanceVariableNames, isFalse, isFrozen, isKindOf, isNil, isTaint, isTrue, kind_of, makeMetaClass, marshalTo, method_missing, method, methods, nilObject, private_methods, protected_methods, rbClone, removeInstanceVariable, respond_to, respondsTo, send, setFrozen, setInstanceVariable, setInstanceVariable, setInstanceVariables, setMetaClass, setTaint, setupClone, singleton_methods, singletonMethodsAllowed, specificEval, taint, tainted, to_a, to_s, type, untaint
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

path

protected java.lang.String path
Constructor Detail

RubyFile

public RubyFile(Ruby ruby,
                java.lang.String path)

RubyFile

public RubyFile(Ruby ruby,
                RubyClass type)
Method Detail

createFileClass

public static RubyClass createFileClass(Ruby ruby)

openInternal

protected void openInternal(java.lang.String path,
                            java.lang.String mode)

newInstance

public static IRubyObject newInstance(IRubyObject recv,
                                      IRubyObject[] args)
Description copied from class: RubyIO
rb_io_s_new


initialize

public IRubyObject initialize(IRubyObject[] args)

open

public static IRubyObject open(IRubyObject recv,
                               IRubyObject[] args)

open

public static IRubyObject open(IRubyObject recv,
                               IRubyObject[] args,
                               boolean tryToYield)

chmod

public static IRubyObject chmod(IRubyObject recv,
                                RubyInteger mode,
                                IRubyObject[] names)

lstat

public static IRubyObject lstat(IRubyObject recv,
                                RubyString name)

unlink

public static IRubyObject unlink(IRubyObject recv,
                                 IRubyObject[] args)

rename

public static IRubyObject rename(IRubyObject recv,
                                 IRubyObject oldName,
                                 IRubyObject newName)

expand_path

public static IRubyObject expand_path(IRubyObject recv,
                                      IRubyObject[] args)

dirname

public static RubyString dirname(IRubyObject recv,
                                 RubyString filename)

basename

public static RubyString basename(IRubyObject recv,
                                  IRubyObject[] args)

join

public static RubyString join(IRubyObject recv,
                              IRubyObject[] args)

toString

public java.lang.String toString()
Overrides:
toString in class RubyIO


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.