Package org.jruby.util.io

Examples of org.jruby.util.io.OpenFile.seek()


        pos = RubyNumeric.num2long(offset);
        fptr = getOpenFileChecked();

        boolean locked = fptr.lock();
        try {
            pos = fptr.seek(context, pos, whence);
            if (pos < 0 && fptr.errno() != null) throw getRuntime().newErrnoFromErrno(fptr.errno(), fptr.getPath());
        } finally {
            if (locked) fptr.unlock();
        }
View Full Code Here


        OpenFile fptr;

        fptr = getOpenFileChecked();
        boolean locked = fptr.lock();
        try {
            if (fptr.seek(context, 0L, 0) < 0 && fptr.errno() != null)
                throw context.runtime.newErrnoFromErrno(fptr.errno(), fptr.getPath());
            RubyArgsFile.ArgsFileData data = RubyArgsFile.ArgsFileData.getDataFrom(runtime.getArgsFile());
            if (this == data.currentFile) {
                data.currentLineNumber -= fptr.getLineNumber();
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.