www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17228] New: File size() can't determine file unsearchable on


          Issue ID: 17228
           Summary: File size() can't determine file unsearchable on
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: sprink.noreply gmail.com

The problem is that size() checks to see if the file is unsearchable by calling
tell(). But on windows ftell does not have to return a -1, so no exception is
thrown when calling tell.



"On devices incapable of seeking (such as terminals and printers), or when
stream does not refer to an open file, the return value is undefined."

Feb 26 2017