This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | vstinner |
|---|---|
| Recipients | benjamin.peterson, eryksun, paul.moore, pitrou, rokozh, steve.dower, stutzbach, tim.golden, vstinner, zach.ware |
| Date | 2015年11月17日.10:47:45 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1447757265.53.0.366968700226.issue25639@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I don't know the physical disk type on Windows. Can you read and write from such "file" type? If no, I don't think that it makes sense to support it in io.FileIO. What do you think? It looks like the file must be opened with specific options, otherwise it doesn't work. See this question on CreateFile(): https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/fa2175fe-02f4-4adb-9cb9-5df3d1122cf6/readfile-works-when-handle-opened-with-drive-letterphysical-drive-symlink-but-not-with-device-path io.FileIO() calls _Py_fstat() for two reasons: 1) raise an error if the path/file descriptor is a directory 2) get the block size _Py_fstat() is implemented with two Windows calls: GetFileType() & GetFileInformationByHandle(). To solve this issue, we need to have a function telling that the path/file descriptor is a physical disk. In this case, we can skip both checks. Documentation on Physical Drivers in CreateFile(): https://msdn.microsoft.com/en-us/library/aa363858%28VS.85%29.aspx#physical_disks_and_volumes |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015年11月17日 10:47:45 | vstinner | set | recipients: + vstinner, paul.moore, pitrou, tim.golden, benjamin.peterson, stutzbach, zach.ware, eryksun, steve.dower, rokozh |
| 2015年11月17日 10:47:45 | vstinner | set | messageid: <1447757265.53.0.366968700226.issue25639@psf.upfronthosting.co.za> |
| 2015年11月17日 10:47:45 | vstinner | link | issue25639 messages |
| 2015年11月17日 10:47:45 | vstinner | create | |