Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12220

Docs for SERVER-38066: Shell utils should open files in binary mode

    XMLWordPrintableJSON

Details

    Description

      Description

      Description:

      The following shell helpers now have the following arguments:
      cat(filePath, [useBinaryMode = false])
      writeFile(filePath, fileContents, [useBinaryMode = false])

      If 'useBinaryMode' is true, files with newline (\n) characters will not be translated into \r\n on Windows.

      Engineering Ticket Description:

      The shell helpers for reading files, cat(), and writing files, writeFile() do not open files in binary mode,  ios::binary. On Windows, this results in \n characters being translated as \r\n.

      If the WiredTiger.turtle file is opened with cat() and written with writeFile(), WiredTiger will be unable to read it because it does not recognize \r characters.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 2 weeks, 6 days ago