Author: dpsimons
Date: Wed Feb 22 17:41:29 2017
New Revision: 40351

URL: http://svn.gna.org/viewcvs/gnustep?rev=40351&view=rev
Log:
implement the NSStream +inputStreamWithURL: method

Modified:
    libs/base/branches/gnustep_testplant_branch/ChangeLog
    libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSStream.h
    libs/base/branches/gnustep_testplant_branch/Source/unix/NSStream.m
    libs/base/branches/gnustep_testplant_branch/Source/win32/NSStream.m

Modified: libs/base/branches/gnustep_testplant_branch/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/ChangeLog?rev=40351&r1=40350&r2=40351&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/ChangeLog       (original)
+++ libs/base/branches/gnustep_testplant_branch/ChangeLog       Wed Feb 22 
17:41:29 2017
@@ -1,3 +1,7 @@
+2017-02-22  Doug Simons <[email protected]>
+
+       * NSStream.m: Implement the +inputStreamWithURL: method.
+
 2016-02-18  Doug Simons <[email protected]>
 
        * NSDateFormatter.m: Fixed the weekday names methods. The ICU weekday

Modified: 
libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSStream.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSStream.h?rev=40351&r1=40350&r2=40351&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSStream.h   
(original)
+++ libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSStream.h   
Wed Feb 22 17:41:29 2017
@@ -160,6 +160,12 @@
  */
 + (id) inputStreamWithFileAtPath: (NSString *)path;
  
+/**
+ * Creates and returns an initialized NSInputStream object that reads data 
from 
+ * the file at the specified URL.
+ */
++ (id)inputStreamWithURL:(NSURL *)url;
+
 /**
  * Returns a pointer to the read buffer in buffer and, by reference, the 
number 
  * of bytes available in len.

Modified: libs/base/branches/gnustep_testplant_branch/Source/unix/NSStream.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/unix/NSStream.m?rev=40351&r1=40350&r2=40351&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/unix/NSStream.m  
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/unix/NSStream.m  Wed Feb 
22 17:41:29 2017
@@ -507,6 +507,11 @@
   return AUTORELEASE([[GSFileInputStream alloc] initWithFileAtPath: path]);
 }
 
++ (id)inputStreamWithURL:(NSURL *)url
+{
+  return [self inputStreamWithFileAtPath:[url path]];
+}
+
 - (BOOL) getBuffer: (uint8_t **)buffer length: (NSUInteger *)len
 {
   [self subclassResponsibility: _cmd];

Modified: libs/base/branches/gnustep_testplant_branch/Source/win32/NSStream.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/win32/NSStream.m?rev=40351&r1=40350&r2=40351&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/win32/NSStream.m 
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/win32/NSStream.m Wed Feb 
22 17:41:29 2017
@@ -1202,6 +1202,11 @@
   return AUTORELEASE([[GSFileInputStream alloc] initWithFileAtPath: path]);
 }
 
++ (id)inputStreamWithURL:(NSURL *)url
+{
+  return [self inputStreamWithFileAtPath:[url path]];
+}
+
 - (BOOL) getBuffer: (uint8_t **)buffer length: (NSUInteger *)len
 {
   [self subclassResponsibility: _cmd];


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to