import os

from waterbutler.core import metadata

class BaseOsfStorageMetadata:
    @property
    def provider(self):
        return 'osfstorage'


class OsfStorageFileMetadata(BaseOsfStorageMetadata, metadata.BaseFileMetadata):

    @property
    def name(self):
        return self.raw['name']

    @property
    def path(self):
        return os.path.join(self.raw['path'], self.name)

    @property
    def modified(self):
        return self.raw.get('modified')

    @property
    def size(self):
        return self.raw.get('size')

    @property
    def content_type(self):
        return None


class OsfStorageFolderMetadata(BaseOsfStorageMetadata, metadata.BaseFolderMetadata):

    @property
    def name(self):
        return self.raw['name']

    @property
    def path(self):
        return os.path.join(self.raw['path'], self.name)

@@ -1,15 +1,4 @@
-import os%0A%0A
 from
@@ -324,37 +324,24 @@
      return 
-os.path.join(
 self.raw%5B'pa
@@ -344,28 +344,16 @@
 %5B'path'%5D
-, self.name)
 %0A%0A    @p
@@ -766,21 +766,8 @@
 urn 
-os.path.join(
 self
@@ -782,17 +782,5 @@
 th'%5D
-, self.name)
 %0A

path is the full path