Skip to content

Conversation

@pmconrad
Copy link
Contributor

@pmconrad pmconrad commented Nov 7, 2019

Part of #1116 / #1584

@abitmore abitmore added this to the 4.1.0 - Feature Release milestone Nov 8, 2019

/**
* @brief Reads the file at the given path and returns the full contents in a string. Note that the result
* will contain non-printable characters if the file does.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I saw "non-printable characters", '\0' didn't come to my mind. I don't know whether it's only me though. Perhaps better if we explicitly mention '\0'? Callers need to be careful when using this function, since functions like c_str() are heavily used in the code base, a strcpy() or strlen() call on the result of c_str() may return unexpected results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor fc::fstream to be more like std::fstream

2 participants