'Returns a tuple of (AccessRights, DefaultAccess), where AccessRights is a sequence of tuples representing
SI_ACCESS structs, containing (guid, access mask, Name, flags). DefaultAccess indicates which of the
AccessRights will be used initially when a new ACE is added (zero based).
Flags can contain SI_ACCESS_SPECIFIC,SI_ACCESS_GENERAL,SI_ACCESS_CONTAINER,SI_ACCESS_PROPERTY,
CONTAINER_INHERIT_ACE,INHERIT_ONLY_ACE,OBJECT_INHERIT_ACE'

def GetAccessRights(self, objecttype, flags):

    if ((objecttype is not None) and (objecttype != IID_NULL)):
        raise NotImplementedError('Object    type    is    not    supported')
    if os.path.isdir(self.FileName):
        file_append_data_desc = 'Create    subfolders'
        file_write_data_desc = 'Create    Files'
    else:
        file_append_data_desc = 'Append    data'
        file_write_data_desc = 'Write    data'
    accessrights = [(IID_NULL, FILE_GENERIC_READ, 'Generic    read', (((SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC) | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, FILE_GENERIC_WRITE, 'Generic    write', (((SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC) | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, win32con.DELETE, 'Delete', ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, WRITE_OWNER, 'Change    owner', ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, READ_CONTROL, 'Read    Permissions', ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, WRITE_DAC, 'Change    permissions', ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, FILE_APPEND_DATA, file_append_data_desc, ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE)), (IID_NULL, FILE_WRITE_DATA, file_write_data_desc, ((SI_ACCESS_SPECIFIC | OBJECT_INHERIT_ACE) | CONTAINER_INHERIT_ACE))]
    return (accessrights, 0)
