Skip to content

Commit

Permalink
[skip ci] Several documentation related FIXME resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
eao197 committed Feb 15, 2024
1 parent e0ef055 commit 7994a15
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
12 changes: 11 additions & 1 deletion dev/restinio/sendfile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,18 @@ sendfile(
chunk_size );
}

//FIXME: document this!
/*!
* @brief Creates an instance for service sendfile operation.
*
* This overload accepts `std::filesystem::path` as file name.
*
* @note
* On Windows it uses `std::filesystem::path::wstring()` for opening
* the file. It means that on Windows UNICODE-based version of
* file-related functions are used and file names with UNICODE symbols
* are supported. On UNIX platforms `std::filesystem::path::string()` is
* used and it's assumed that file names are in UTF-8.
*
* @since v.0.7.1
*/
[[nodiscard]]
Expand Down
17 changes: 15 additions & 2 deletions dev/restinio/sendfile_defs_default.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,15 @@ using file_size_t = std::uint64_t;
[[nodiscard]]
constexpr file_descriptor_t null_file_descriptor(){ return nullptr; }

//FIXME: document platform-specific behavior.
//! Open file.
/*!
* @note
* It uses `fopen_s` if the compiler is VC++.
*
* @note
* It's expected that @a file_path contains names in ANSI encoding
* on Windows platform.
*/
[[nodiscard]]
inline file_descriptor_t
open_file( const char * file_path )
Expand Down Expand Up @@ -79,10 +86,16 @@ open_file( const char * file_path )
#endif
}

//FIXME: document platform-specific behavior!
/*!
* @brief Helper function that accepts std::filesystem::path.
*
* @note
* It uses `_wfopen_s` if the compiler is VC++.
*
* @note
* It's expected that @a file_path contains names in ANSI encoding
* on Windows platform.
*
* @since v.0.7.1
*/
[[nodiscard]]
Expand Down

0 comments on commit 7994a15

Please sign in to comment.