Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileInfo.ToString documentation contains incorrect guidance #9212

Closed
ryancdotnet opened this issue Aug 24, 2023 · 2 comments · Fixed by #9213
Closed

FileInfo.ToString documentation contains incorrect guidance #9212

ryancdotnet opened this issue Aug 24, 2023 · 2 comments · Fixed by #9213
Labels
area-System.IO Pri3 Indicates issues/PRs that are low priority
Milestone

Comments

@ryancdotnet
Copy link
Contributor

On the FileInfo.ToString documentation, it mentions the following:

FileInfo.ToString Method

Definition

Returns the path as a string. Use the Name property for the full path.

(See: https://learn.microsoft.com/en-us/dotnet/api/system.io.fileinfo.tostring?view=net-6.0#definition)

What's wrong?

The guidance about using the FileInfo.Name property to get the "full path" is incorrect. FileInfo.Name will only get you the file name without parent path information. This is misleading to readers.

Proposed change

Remove this superfluous guidance, as there is a remark below this section (marked important) that details what the path returned contains, as well as mentions the alternate methods of getting at file name and path information.

@issues-automation issues-automation bot added the Pri3 Indicates issues/PRs that are low priority label Aug 24, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Aug 24, 2023
@ghost
Copy link

ghost commented Aug 24, 2023

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

On the FileInfo.ToString documentation, it mentions the following:

FileInfo.ToString Method

Definition

Returns the path as a string. Use the Name property for the full path.

(See: https://learn.microsoft.com/en-us/dotnet/api/system.io.fileinfo.tostring?view=net-6.0#definition)

What's wrong?

The guidance about using the FileInfo.Name property to get the "full path" is incorrect. FileInfo.Name will only get you the file name without parent path information. This is misleading to readers.

Proposed change

Remove this superfluous guidance, as there is a remark below this section (marked important) that details what the path returned contains, as well as mentions the alternate methods of getting at file name and path information.

Author: ryancdotnet
Assignees: -
Labels:

untriaged, Pri3, area-System.IO

Milestone: -

@ryancdotnet
Copy link
Contributor Author

Resolves with #9213

@jozkee jozkee added this to the Backlog milestone Aug 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.IO Pri3 Indicates issues/PRs that are low priority
Projects
None yet
2 participants