parameters: (self, target_directory)
return_statement: return directory
docstring: Tests that the target is actually a directory, raising OSError if not.
  
      Args:
        target_directory:  path to the target directory within the fake
          filesystem
  
      Returns:
        the FakeFile object corresponding to target_directory
  
      Raises:
        OSError:  if the target is not a directory
docstring_summary: Tests that the target is actually a directory, raising OSError if not.
docstring_tokens: Tests that the target is actually a directory raising OSError if not .
function: def _ConfirmDir(self, target_directory):
      """Tests that the target is actually a directory, raising OSError if not.
  
      Args:
        target_directory:  path to the target directory within the fake
          filesystem
  
      Returns:
        the FakeFile object corresponding to target_directory
  
      Raises:
        OSError:  if the target is not a directory
      """
      try:
        directory = self.filesystem.GetObject(target_directory)
      except IOError as e:
        raise OSError(e.errno, e.strerror, target_directory)
      if not directory.st_mode & stat.S_IFDIR:
        raise OSError(errno.ENOTDIR,
                      'Fake os module: not a directory',
                      target_directory)
      return directory
function_tokens: def _ConfirmDir ( self , target_directory ) : try : directory = self . filesystem . GetObject ( target_directory ) except IOError as e : raise OSError ( e . errno , e . strerror , target_directory ) if not directory . st_mode & stat . S_IFDIR : raise OSError ( errno . ENOTDIR , 'Fake os module: not a directory' , target_directory ) return directory