tracker issue : CF-3940335

select a category, or use search below
(searches all categories and all time range)
Title:

File.isEof() not implemented

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 02/15/2015

Components: Language

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Platforms All

Vote Count: 1

Repro:
~~~~
f = fileOpen(getCurrentTemplatePath());
line = f.readLine(); // works fine
done = f.isEof(); // errors
~~~~

If you implement *some* file methods, you kinda need to implement all of them.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3940335

External Customer Info:
External Company:  
External Customer Name: Adam
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

FYI, equiv Lucee bug: https://bitbucket.org/lucee/lucee/issue/159/fileiseof-not-implemented
Comment by External U.
8477 | February 15, 2015 10:28:34 PM GMT
Please try with isendoffile(), instead of iseof() and let us know about this.
Comment by Akhila K.
8478 | February 20, 2015 04:02:52 AM GMT
Well that works, but the bug still stands. The equivalent method to fileIsEof() should simply be .isEof(). What possessed you to use a different naming scheme for this one? Serious question, what were you thinking? You need to implement the language in a predictable fashion (something that really seems to elude you people sometimes). So my recommendation here is to move the functionality from isEndOfFile() to isEof(), turn .isEndOfFile() into an alias of .isEof(), and deprecate .isEndOfFile(). And think things through a bit better in future. I *do* want an explanation as to why you chose isEndOfFile() over isEof(), btw.
Comment by External U.
8479 | February 23, 2015 07:17:39 PM GMT
................................................................
Vote by External U.
8483 | July 01, 2015 03:00:22 AM GMT
@Adam, We haven't specifically added the member function support for File object. In this example, it is working because you are invoking these functions on the Java object that you get after opening the stream. We can rename the function on this java object to isEOF, but the point I am trying to make is - when this was written way back in CF8, it wasn't expected to be used as member function. You can try the example above in CF 8.
Comment by Rupesh K.
8480 | July 24, 2015 07:02:44 AM GMT
Ah OK, that makes a bit of sense. So my position then perhaps becomes "implement object methods" on the File object. But that would be a different ticket. We can probably close this one though.
Comment by External U.
8481 | July 24, 2015 07:19:45 AM GMT
I've opened https://bugbase.adobe.com/index.cfm?event=bug&id=CF-4025814 to cover the object methods (and a coupla class methods).
Comment by External U.
8482 | July 24, 2015 07:30:32 AM GMT