Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3888

Show
Ignore:
Timestamp:
08/18/08 14:54:01 (4 months ago)
Author:
keinfarbton
Message:

merged from trunk -r 3855:3856

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/D2.0/example/conduits/FileBucket.d

    r3724 r3888  
    11module FileBucket; 
    22 
    3 private import  tango.io.FileConduit; 
     3private import  tango.io.device.FileConduit; 
    44 
    55private import  tango.core.Exception; 
  • branches/experimental/D2.0/example/conduits/composite.d

    r2816 r3888  
    22private import  tango.io.protocol.Reader, 
    33                tango.io.protocol.Writer, 
    4                 tango.io.FileConduit; 
     4                tango.io.device.FileConduit; 
    55 
    66/******************************************************************************* 
  • branches/experimental/D2.0/example/conduits/filecat.d

    r2497 r3888  
    11private import  tango.io.Console, 
    2                 tango.io.FileConduit; 
     2                tango.io.device.FileConduit; 
    33 
    44/******************************************************************************* 
  • branches/experimental/D2.0/example/conduits/filecopy.d

    r2465 r3888  
    11 
    22private import  tango.io.Console, 
    3                 tango.io.FileConduit; 
     3                tango.io.device.FileConduit; 
    44 
    55/******************************************************************************* 
  • branches/experimental/D2.0/example/conduits/lineio.d

    r2490 r3888  
    11 
    22private import  tango.io.Console, 
    3                 tango.io.FileConduit; 
     3                tango.io.device.FileConduit; 
    44 
    55private import  tango.text.stream.LineIterator; 
  • branches/experimental/D2.0/example/conduits/mmap.d

    r2465 r3888  
    11 
    22private import  tango.io.Console, 
    3                 tango.io.FileConduit, 
     3                tango.io.device.FileConduit, 
    44                tango.io.MappedBuffer; 
    55 
  • branches/experimental/D2.0/example/conduits/randomio.d

    r2465 r3888  
    11 
    2 private import  tango.io.FileConduit; 
     2private import  tango.io.device.FileConduit; 
    33 
    44private import  tango.io.protocol.Reader, 
  • branches/experimental/D2.0/example/networking/netcopy.d

    r3724 r3888  
    1111 
    1212private import  tango.io.Console, 
    13                 tango.io.FileConduit; 
     13                tango.io.device.FileConduit; 
    1414 
    1515private import  tango.net.ServerSocket, 
  • branches/experimental/D2.0/example/networking/selector.d

    r3724 r3888  
    2121    import tango.io.selector.SelectSelector; 
    2222    import tango.io.selector.SelectorException; 
    23     import tango.io.Conduit; 
     23    import tango.io.device.Conduit; 
    2424    import tango.net.Socket; 
    2525    import tango.net.SocketConduit; 
  • branches/experimental/D2.0/example/system/arguments.d

    r3724 r3888  
    55import tango.util.Arguments; 
    66import tango.io.Stdout; 
    7 import tango.io.FileConduit; 
     7import tango.io.device.FileConduit; 
    88import tango.text.stream.LineIterator; 
    99 
  • branches/experimental/D2.0/install/windows/build_tango.d

    r3724 r3888  
    11module build_tango; 
    22 
    3 import tango.io.FileConduit; 
     3import tango.io.device.FileConduit; 
    44import tango.io.FileScan; 
    55import tango.io.Stdout; 
  • branches/experimental/D2.0/install/windows/install_dmd.d

    r3724 r3888  
    1 import tango.io.FileConduit; 
     1import tango.io.device.FileConduit; 
    22import tango.io.FilePath; 
    33import tango.io.FileScan; 
  • branches/experimental/D2.0/tango/group/file.d

    r3724 r3888  
    2121                tango.io.Stdout, 
    2222                tango.io.Buffer, 
    23                 tango.io.Conduit, 
     23                tango.io.device.Conduit, 
    2424                tango.io.Console, 
    2525                tango.io.FilePath, 
    2626                tango.io.FileSystem, 
    27                 tango.io.FileConduit, 
     27                tango.io.device.FileConduit, 
    2828                tango.io.UnicodeFile, 
    2929                tango.io.MappedBuffer; 
  • branches/experimental/D2.0/tango/io/Console.d

    r3724 r3888  
    1818 
    1919private import  tango.io.Buffer, 
    20                 tango.io.DeviceConduit; 
     20                tango.io.device.DeviceConduit; 
    2121 
    2222 
  • branches/experimental/D2.0/tango/io/File.d

    r3724 r3888  
    1515 
    1616private import  tango.io.FilePath, 
    17                 tango.io.FileConduit; 
     17                tango.io.device.FileConduit; 
    1818 
    1919private import  tango.core.Exception; 
  • branches/experimental/D2.0/tango/io/FileSystem.d

    r3886 r3888  
    3333        private import tango.stdc.posix.unistd; 
    3434 
    35         private import tango.io.FileConduit; 
     35        private import tango.io.device.FileConduit; 
    3636        private import Integer = tango.text.convert.Integer; 
    3737        } 
  • branches/experimental/D2.0/tango/io/MappedBuffer.d

    r3724 r3888  
    1919private import  tango.core.Exception; 
    2020 
    21 public  import  tango.io.FileConduit; 
     21public  import  tango.io.device.FileConduit; 
    2222 
    2323/******************************************************************************* 
  • branches/experimental/D2.0/tango/io/TempFile.d

    r3887 r3888  
    1414import Path = tango.io.Path; 
    1515import tango.math.random.Kiss : Kiss; 
    16 import tango.io.DeviceConduit : DeviceConduit; 
    17 import tango.io.FileConduit : FileConduit; 
     16import tango.io.device.DeviceConduit : DeviceConduit; 
     17import tango.io.device.FileConduit : FileConduit; 
    1818import tango.io.FilePath : FilePath; 
    1919import tango.stdc.stringz : toStringz, toString16z; 
  • branches/experimental/D2.0/tango/io/UnicodeFile.d

    r3724 r3888  
    1515private import  tango.io.FilePath; 
    1616 
    17 private import  tango.io.FileConduit; 
     17private import  tango.io.device.FileConduit; 
    1818 
    1919private import  tango.core.Exception; 
  • branches/experimental/D2.0/tango/io/compress/BzipStream.d

    r3724 r3888  
    1717private import tango.core.Exception : IOException; 
    1818 
    19 private import tango.io.Conduit : InputFilter, OutputFilter; 
     19private import tango.io.device.Conduit : InputFilter, OutputFilter; 
    2020 
    2121private import tango.io.model.IConduit : InputStream, OutputStream, IConduit; 
  • branches/experimental/D2.0/tango/io/compress/Zip.d

    r3887 r3888  
    2929import tango.core.ByteSwap : ByteSwap; 
    3030import tango.io.Buffer : Buffer; 
    31 import tango.io.FileConduit : FileConduit; 
     31import tango.io.device.FileConduit : FileConduit; 
    3232import tango.io.FilePath : FilePath, PathView; 
    3333import tango.io.MappedBuffer : MappedBuffer; 
     
    22862286private: 
    22872287 
    2288 import tango.io.Conduit : Conduit; 
     2288import tango.io.device.Conduit : Conduit; 
    22892289 
    22902290/******************************************************************************* 
     
    23022302//module tangox.io.stream.CounterStream; 
    23032303 
    2304 //import tango.io.Conduit : Conduit; 
     2304//import tango.io.device.Conduit : Conduit; 
    23052305//import tango.io.model.IConduit : IConduit, InputStream, OutputStream; 
    23062306 
     
    24312431//module tangox.io.stream.SliceStream; 
    24322432 
    2433 //import tango.io.Conduit : Conduit; 
     2433//import tango.io.device.Conduit : Conduit; 
    24342434//import tango.io.model.IConduit : IConduit, InputStream, OutputStream; 
    24352435 
     
    27592759//module tangox.io.stream.WrapStream; 
    27602760 
    2761 //import tango.io.Conduit : Conduit; 
     2761//import tango.io.device.Conduit : Conduit; 
    27622762//import tango.io.model.IConduit : IConduit, InputStream, OutputStream; 
    27632763 
  • branches/experimental/D2.0/tango/io/compress/ZlibStream.d

    r3724 r3888  
    2121private import tango.core.Exception : IOException; 
    2222 
    23 private import tango.io.Conduit : InputFilter, OutputFilter; 
     23private import tango.io.device.Conduit : InputFilter, OutputFilter; 
    2424 
    2525private import tango.io.model.IConduit : InputStream, OutputStream, IConduit; 
  • branches/experimental/D2.0/tango/io/device/Conduit.d

    r3856 r3888  
    4747        ***********************************************************************/ 
    4848 
    49         abstract char[] toString ();  
     49        abstract Cutf8 toString (); 
    5050                      
    5151        /*********************************************************************** 
     
    8181        ***********************************************************************/ 
    8282 
    83         abstract uint write (void [] src); 
     83        abstract uint write (const(void)[] src); 
    8484 
    8585        /*********************************************************************** 
     
    9797        ***********************************************************************/ 
    9898 
    99         bool isAlive () 
     99        override bool isAlive () 
    100100        { 
    101101                return true; 
     
    103103 
    104104        /*********************************************************************** 
    105          
     105 
    106106                Return the host. This is part of the Stream interface 
    107107 
    108108        ***********************************************************************/ 
    109109 
    110         final IConduit conduit() 
    111         { 
    112                 return this; 
    113         } 
    114                              
     110        final override IConduit conduit() 
     111        { 
     112                return this; 
     113        } 
     114 
    115115        /*********************************************************************** 
    116116 
     
    119119        ***********************************************************************/ 
    120120 
    121         InputStream clear () {return this;} 
     121        override InputStream clear () {return this;} 
    122122 
    123123        /*********************************************************************** 
     
    132132 
    133133                Close this conduit 
    134                  
     134 
    135135                Remarks: 
    136136                Both input and output are detached, and are no longer usable 
     
    138138        ***********************************************************************/ 
    139139 
    140         final void close () 
     140        final override void close () 
    141141        { 
    142142                this.detach; 
     
    145145        /*********************************************************************** 
    146146 
    147                 Return the current input stream  
    148                   
    149         ***********************************************************************/ 
    150          
    151         final InputStream input () 
     147                Return the current input stream 
     148 
     149        ***********************************************************************/ 
     150 
     151        final override InputStream input () 
    152152        { 
    153153                return this; 
     
    159159 
    160160        ***********************************************************************/ 
    161          
    162         final OutputStream output () 
     161 
     162        final override OutputStream output () 
    163163        { 
    164164                return this; 
     
    171171        ***********************************************************************/ 
    172172 
    173         final void error (char[] msg) 
     173        final override void error (Cutf8 msg) 
    174174        { 
    175175                throw new IOException (msg); 
     
    183183        ***********************************************************************/ 
    184184 
    185         final OutputStream copy (InputStream src) 
     185        final override OutputStream copy (InputStream src) 
    186186        { 
    187187                transfer (src, this); 
     
    198198                Returns an array representing the content, and throws 
    199199                IOException on error 
    200                  
     200 
    201201        ***********************************************************************/ 
    202202 
     
    215215                Returns an array representing the content, and throws 
    216216                IOException on error 
    217                  
     217 
    218218        ***********************************************************************/ 
    219219 
     
    222222                auto index = 0; 
    223223                auto chunk = 256; 
    224                  
     224 
    225225                do { 
    226226                   if (dst.length - index < chunk) 
     
    235235 
    236236        /*********************************************************************** 
    237                  
     237 
    238238                Low-level data transfer, where max represents the maximum 
    239239                number of bytes to transfer, and tmp represents space for 
     
    299299        ***********************************************************************/ 
    300300 
    301         IConduit conduit () 
     301        override IConduit conduit () 
    302302        { 
    303303                return host.conduit; 
     
    306306        /*********************************************************************** 
    307307 
    308                 Read from conduit into a target array. The provided dst  
    309                 will be populated with content from the conduit.  
     308                Read from conduit into a target array. The provided dst 
     309                will be populated with content from the conduit. 
    310310 
    311311                Returns the number of bytes read, which may be less than 
    312                 requested in dst. Eof is returned whenever an end-of-flow  
     312                requested in dst. Eof is returned whenever an end-of-flow 
    313313                condition arises. 
    314314 
    315315        ***********************************************************************/ 
    316316 
    317         uint read (void[] dst) 
     317        override uint read (void[] dst) 
    318318        { 
    319319                return host.read (dst); 
     
    326326        ***********************************************************************/ 
    327327 
    328         InputStream clear () 
     328        override InputStream clear () 
    329329        { 
    330330                host.clear; 
     
    340340                Returns an array representing the content, and throws 
    341341                IOException on error 
    342                                
     342 
    343343        ***********************************************************************/ 
    344344 
     
    354354        ***********************************************************************/ 
    355355 
    356         void close () 
     356        override void close () 
    357357        { 
    358358                host.close; 
     
    363363/******************************************************************************* 
    364364 
    365          Base class for output stream filtering   
     365         Base class for output stream filtering 
    366366 
    367367*******************************************************************************/ 
     
    389389        ***********************************************************************/ 
    390390 
    391         IConduit conduit () 
     391        override IConduit conduit () 
    392392        { 
    393393                return host.conduit; 
     
    400400 
    401401                Returns the number of bytes written from src, which may 
    402                 be less than the quantity provided. Eof is returned when  
     402                be less than the quantity provided. Eof is returned when 
    403403                an end-of-flow condition arises. 
    404404 
    405405        ***********************************************************************/ 
    406406 
    407         uint write (void[] src) 
     407        override uint write (const(void)[] src) 
    408408        { 
    409409                return host.write (src); 
     
    416416        ***********************************************************************/ 
    417417 
    418         OutputStream flush () 
     418        override OutputStream flush () 
    419419        { 
    420420                host.flush; 
  • branches/experimental/D2.0/tango/io/device/DeviceConduit.d

    r3856 r3888  
    3535 
    3636                Throw an IOException noting the last error 
    37          
     37 
    3838        ***********************************************************************/ 
    3939 
     
    4949        ***********************************************************************/ 
    5050 
    51         override char[] toString () 
     51        override Cutf8 toString () 
    5252        { 
    5353                return "<device>"; 
     
    117117 
    118118                        Read a chunk of bytes from the file into the provided 
    119                         array (typically that belonging to an IBuffer).  
     119                        array (typically that belonging to an IBuffer). 
    120120 
    121121                        Returns the number of bytes read, or Eof when there is 
     
    148148                ***************************************************************/ 
    149149 
    150                 override uint write (void[] src) 
     150                override uint write (const(void)[] src) 
    151151                { 
    152152                        DWORD written; 
     
    230230                ***************************************************************/ 
    231231 
    232                 override uint write (void[] src) 
     232                override uint write (const(void)[] src) 
    233233                { 
    234234                        int written = posix.write (handle, src.ptr, src.length); 
  • branches/experimental/D2.0/tango/io/device/FileConduit.d

    r3856 r3888  
    309309        ***********************************************************************/ 
    310310 
    311         override char[] toString () 
     311        override Cutf8 toString () 
    312312        { 
    313313                return path_; 
     
    447447                ***************************************************************/ 
    448448 
    449                 override uint write (void[] src) 
     449                override uint write (const(void)[] src) 
    450450                { 
    451451                        DWORD written; 
  • branches/experimental/D2.0/tango/io/model/IConduit.d

    r3886 r3888  
    1616/******************************************************************************* 
    1717 
    18         Conduits provide virtualized access to external content, and 
    19         represent things like files or Internet connections. Conduits 
    20         expose a pair of streams, are modelled by tango.io.model.IConduit, 
    21         and are implemented via classes such as FileConduit & SocketConduit. 
    22  
    23         Additional kinds of conduit are easy to construct: one either 
    24         subclasses tango.io.Conduit, or implements tango.io.model.IConduit. 
    25         A conduit typically reads and writes from/to an IBuffer in large 
    26         chunks, typically the entire buffer. Alternatively, one can invoke 
     18        Conduits provide virtualized access to external content, and  
     19        represent things like files or Internet connections. Conduits  
     20        expose a pair of streams, are modelled by tango.io.model.IConduit,  
     21        and are implemented via classes such as FileConduit & SocketConduit.  
     22         
     23        Additional kinds of conduit are easy to construct: one either  
     24        subclasses tango.io.device.Conduit, or implements tango.io.model.IConduit.  
     25        A conduit typically reads and writes from/to an IBuffer in large  
     26        chunks, typically the entire buffer. Alternatively, one can invoke  
    2727        input.read(dst[]) and/or output.write(src[]) directly. 
    2828 
  • branches/experimental/D2.0/tango/io/stream/DataFileStream.d

    r3724 r3888  
    1313module tango.io.stream.DataFileStream; 
    1414 
    15 private import tango.io.FileConduit; 
     15private import tango.io.device.FileConduit; 
    1616 
    1717private import tango.io.stream.DataStream; 
  • branches/experimental/D2.0/tango/io/stream/DataStream.d

    r3724 r3888  
    1515private import tango.io.Buffer; 
    1616 
    17 private import tango.io.Conduit; 
     17private import tango.io.device.Conduit; 
    1818 
    1919private import tango.core.ByteSwap; 
  • branches/experimental/D2.0/tango/io/stream/DigestStream.d

    r3724 r3888  
    1313module tango.io.stream.DigestStream; 
    1414 
    15 private import tango.io.Conduit; 
     15private import tango.io.device.Conduit; 
    1616 
    1717private import tango.io.digest.Digest; 
  • branches/experimental/D2.0/tango/io/stream/EndianStream.d

    r3724 r3888  
    1717 
    1818private import  tango.io.Buffer, 
    19                 tango.io.Conduit; 
     19                tango.io.device.Conduit; 
    2020 
    2121private import  tango.core.ByteSwap; 
  • branches/experimental/D2.0/tango/io/stream/FileStream.d

    r2810 r3888  
    1313module tango.io.stream.FileStream; 
    1414 
    15 public import tango.io.FileConduit; 
     15public import tango.io.device.FileConduit; 
    1616 
    1717/******************************************************************************* 
  • branches/experimental/D2.0/tango/io/stream/GreedyStream.d

    r3724 r3888  
    1313module tango.io.stream.GreedyStream; 
    1414 
    15 private import tango.io.Conduit; 
     15private import tango.io.device.Conduit; 
    1616 
    1717 
  • branches/experimental/D2.0/tango/io/stream/MapStream.d

    r3724 r3888  
    1616 
    1717private import  tango.io.Buffer, 
    18                 tango.io.Conduit; 
     18                tango.io.device.Conduit; 
    1919 
    2020private import  Text = tango.text.Util; 
  • branches/experimental/D2.0/tango/io/stream/SnoopStream.d

    r3724 r3888  
    1414 
    1515private import  tango.io.Console, 
    16                 tango.io.Conduit; 
     16                tango.io.device.Conduit; 
    1717 
    1818private import  tango.text.convert.Format; 
  • branches/experimental/D2.0/tango/io/stream/TextFileStream.d

    r3724 r3888  
    1313module tango.io.stream.TextFileStream; 
    1414 
    15 public  import tango.io.FileConduit; 
     15public  import tango.io.device.FileConduit; 
    1616 
    1717private import tango.io.Buffer; 
  • branches/experimental/D2.0/tango/io/stream/TypedStream.d

    r2840 r3888  
    1717 
    1818private import  tango.io.Buffer, 
    19                 tango.io.Conduit; 
     19                tango.io.device.Conduit; 
    2020 
    2121/******************************************************************************* 
  • branches/experimental/D2.0/tango/io/stream/UtfStream.d

    r3724 r3888  
    1818 
    1919private import  tango.io.Buffer, 
    20                 tango.io.Conduit; 
     20                tango.io.device.Conduit; 
    2121 
    2222private import Utf = tango.text.convert.Utf; 
  • branches/experimental/D2.0/tango/io/vfs/FileFolder.d

    r3724 r3888  
    1515private import tango.util.PathUtil; 
    1616 
    17 private import tango.io.FileConduit; 
     17private import tango.io.device.FileConduit; 
    1818 
    1919private import Path = tango.io.Path; 
  • branches/experimental/D2.0/tango/io/vfs/ZipFolder.d

    r3887 r3888  
    1515module tango.io.vfs.ZipFolder; 
    1616 
    17 import tango.io.FileConduit : FileConduit; 
     17import tango.io.device.FileConduit : FileConduit; 
    1818import tango.io.FilePath : FilePath; 
    1919import tango.io.TempFile : TempFile;