[DOCS-12220] Docs for SERVER-38066: Shell utils should open files in binary mode Created: 27/Nov/18  Updated: 13/Nov/23  Resolved: 24/Jan/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 4.1.6, 4.0.5, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-38066 Shell utils should open files in bina... Closed
Participants:
Days since reply: 5 years, 2 weeks, 6 days ago
Epic Link: DOCS: 4.2 Server/Tools

 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.)



 Comments   
Comment by Githook User [ 24/Jan/19 ]

Author:

{'email': 'kay.kim@mongodb.com', 'name': 'Kay Kim'}

Message: DOCS-12220: cat and binaryMode
Branch: v4.0
https://github.com/mongodb/docs/commit/ec56f5e302e10041d5ff0334d5b9ada4730175f0

Comment by Githook User [ 24/Jan/19 ]

Author:

{'email': 'kay.kim@mongodb.com', 'name': 'Kay Kim'}

Message: DOCS-12220: cat and binaryMode
Branch: master
https://github.com/mongodb/docs/commit/ce6b92e424984004e2d5a21b3774a3b3b0dd2197

Generated at Thu Feb 08 08:04:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.