Skip to content

Doc: possible clarifications in the documentation for /vsistdout/ and /vsistdout_redirect/ #14473

@ctoney

Description

@ctoney

Feature description

I was a little confused at first by the documentation at https://gdal.org/en/latest/user/virtual_file_systems.html#vsistdout-standard-output-streaming:

A variation of this file system exists as the /vsistdout_redirect/ file system handler, where the output function can be defined with VSIStdoutSetRedirection().

I had to consult source to see VSIStdoutSetRedirection() in fact redirects /vsistdout/ by redefining its output function, and confirmed in application code.

/vsistdout_redirect/ operates on a VSIVirtualHandle, redirecting to it I assume. In tests, it's always chained to /vsimem/, e.g., /vsistdout_redirect//vsimem/tmp.gif. I don't fully understand the use case(s), maybe it's primarily for testing?

Sorry, my understanding isn't quite sufficient for PR. Possibly a small doc update to the /vsistdout/ section for GDAL Virtual File Systems could clarify? Ability to redirect /vsistdout/ was very helpful in my use case. The API documentation for VSIStdoutSetRedirection() seems clear to me as-is.

Not a priority obviously, thanks!

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationIssues and contributions to the documentation contentnot for AI loversSee https://gdal.org/en/stable/community/ai_tool_policy.html

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions