'''
Created on Oct 11, 2012

A set of attributes assocated with a file/directory
@author: carr
'''

class FileAttributeSet(set):
    '''
    classdocs
    '''


    def __init__(self) : 
        self.READ = 'r'
        self.WRITE = 'w'
        self.EXEC = 'x'

    
    def addReadPermission(self) :
        self.add(self.READ)
        
    def addWritePermission(self) :
        self.add(self.WRITE)
        
    def addExecPermission(self) :
        self.add(self.EXEC)
        
    def hasReadPermission(self):
        return self.READ in self
    
    def hasWritePermission(self):
        return self.WRITE in self
    
    def hasExecPermission(self):
        return self.EXEC in self
    