Skip to content

Commit

Permalink
Showing 3 changed files with 15 additions and 6 deletions.
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/file/identical_tags.txt

This file was deleted.

3 changes: 0 additions & 3 deletions spec/truffle/tags/core/filetest/identical_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -30,6 +30,21 @@
@CoreClass(name = "Rubinius::FFI::Platform::POSIX")
public abstract class PosixNodes {

@CoreMethod(names = "access", isModuleFunction = true, required = 2)
public abstract static class AccessNode extends CoreMethodArrayArgumentsNode {

public AccessNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

@Specialization
public int access(RubyString path, int mode) {
final String pathString = RubyEncoding.decodeUTF8(path.getByteList().getUnsafeBytes(), path.getByteList().getBegin(), path.getByteList().getRealSize());
return posix().access(pathString, mode);
}

}

@CoreMethod(names = "chmod", isModuleFunction = true, required = 2)
public abstract static class ChmodNode extends CoreMethodArrayArgumentsNode {

0 comments on commit 9466e52

Please sign in to comment.