def _CreateTestFile(self, file_type, path, contents=None):
        path = Sep(path)
        self._created_files.append([file_type, path, contents])
        real_path, fake_path = self._Paths(path)
        if file_type == 'd':
            os.mkdir(real_path)
            self.fake_os.mkdir(fake_path)
        if file_type == 'f':
            fh = open(real_path, 'w')
            fh.write(contents or '')
            fh.close()
            fh = self.fake_open(fake_path, 'w')
            fh.write(contents or '')
            fh.close()
        # b for binary file
        if file_type == 'b':
            fh = open(real_path, 'wb')
            fh.write(contents or '')
            fh.close()
            fh = self.fake_open(fake_path, 'wb')
            fh.write(contents or '')
            fh.close()
        # l for symlink, h for hard link
        if file_type in ('l', 'h'):
            real_target, fake_target = (contents, contents)
            # If it begins with '/', make it relative to the base.    You can't go
            # creating files in / for the real file system.
            if contents.startswith(os.sep):
                real_target, fake_target = self._Paths(contents[1:])
            if file_type == 'l':
                os.symlink(real_target, real_path)
                self.fake_os.symlink(fake_target, fake_path)
            elif file_type == 'h':
                os.link(real_target, real_path)
                self.fake_os.link(fake_target, fake_path)
Commits the file at 'aPath'. This method will also automatically
dataset/ETHPy150Open jmcgeheeiv/pyfakefs/fake_filesystem_vs_real_test.py/FakeFilesystemVsRealTest._CreateTestFile--crossover with--dataset/ETHPy150Open munki/munkiwebadmin/manifests/models.py/MunkiGit.commitFileAtPathForCommitter