bugGNUstep - Bugs: bug #24759, [NSFileHandle readDataToEndOfFile]...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24759: [NSFileHandle readDataToEndOfFile] should return empty data for a new file or one which doesn't exist.

Submitted by:  Gregory John Casamento <gcasa>
Submitted on:  Wed 05 Nov 2008 10:41:29 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Declined

Fri 07 Nov 2008 02:32:59 PM UTC, comment #2:

> How is that possible? If the file doesn't exists, how can you have a handle to it?


I guess it's because, if you're opening the file for writing and it doesn't exist it creates it for you and gives you the handle to it.

After further thought on this, however, I believe our behavior is more correct than Cocoa's. Cocoa appears to be opening the file for read/write and setting the pointer to the beginning of the file whereas we're opening it for write only.

This isn't clearly documented in Apple's docs (as usual) so it's open to interpretation.

At this point, I don't believe this is an issue.

Gregory John Casamento <gcasa>
Project Administrator
Fri 07 Nov 2008 09:08:59 AM UTC, comment #1:

The actual description of the bug appears to be missing.
The summary seems incorrect ...

> [NSFileHandle readDataToEndOfFile] should return empty data for a new file


A quick test program shows it returning an empty data item for a new file.

> or one which doesn't exist


How is that possible? If the file doesn't exists, how can you have a handle to it?

Richard Frith-Macdonald <CaS>
Project Member
Wed 05 Nov 2008 10:41:29 PM UTC, original submission:

This behavior was observed on Mac OS X/Cocoa while testing an application that is in the process of being ported.

GC

Gregory John Casamento <gcasa>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by gcasa (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Dec 2008 07:03:39 PM UTCgcasaStatusNeed Info=>Invalid
      Open/ClosedOpen=>Declined
    Fri 07 Nov 2008 09:08:59 AM UTCCaSStatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1