Skip to content
Permalink
Browse files

Merge pull request #789 from kostya/path

File#path
  • Loading branch information
alex committed Jul 8, 2013
2 parents 9026f3e + 01b8eb4 commit 08921d6443f2fa6ede84dab5af27942e55041583
Showing with 11 additions and 2 deletions.
  1. +0 −2 spec/tags/core/file/path_tags.txt
  2. +11 −0 topaz/objects/fileobject.py

This file was deleted.

@@ -96,6 +96,7 @@ def method_initialize(self, space, filename, w_mode=None, w_perm_or_opt=None, w_
self.fd = os.open(filename, mode, perm)
except OSError as e:
raise error_for_oserror(space, e)
self.filename = filename
return self

@classdef.singleton_method("dirname", path="path")
@@ -255,6 +256,16 @@ def method_truncate(self, space, length):
raise error_for_oserror(space, e)
return space.newint(0)

@classdef.singleton_method("path", path="path")
def singleton_method_path(self, space, path):
w_str = space.newstr_fromstr(path)
space.send(w_str, "freeze")
return w_str

@classdef.method("path")
def method_path(self, space):
return space.newstr_fromstr(self.filename)

@classdef.method("chmod", mode="int")
def method_chmod(self, space, mode):
try:

0 comments on commit 08921d6

Please sign in to comment.
You can’t perform that action at this time.