<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_directory (self):
 """ Check if file is a directory. @return: True iff file is a directory @rtype: bool """

        filename = self.get_os_filename()
        return os.path.isdir(filename) and not os.path.islink(filename)