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

Changeset 3891

Show
Ignore:
Timestamp:
08/18/08 19:45:53 (4 months ago)
Author:
keinfarbton
Message:

Fix more compile errors. Files still not compiling:
tango/sys/Environment.d
tango/net/http/HttpTokens.d
tango/net/ftp/FtpClient.d
tango/text/Regex.d
tango/text/stream/RegexIterator.d
tango/io/vfs/VirtualFolder.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/D2.0/tango/io/File.d

    r3888 r3891  
    3737class File 
    3838{ 
    39         private char[] path_; 
     39        private Cutf8 path_; 
    4040 
    4141        /*********************************************************************** 
  • branches/experimental/D2.0/tango/io/FilePath.d

    r3890 r3891  
    2626private import  tango.io.Path; 
    2727 
    28 private import  tango.io.model.IFile : FileConst
     28private import  tango.io.model.IFile/+ : FileConst+/
    2929 
    3030private import  tango.core.Exception : IllegalArgumentException; 
  • branches/experimental/D2.0/tango/io/FileSystem.d

    r3888 r3891  
    2020private import  tango.io.FilePath; 
    2121 
     22private import  tango.io.device.FileConduit; 
     23 
    2224private import  tango.core.Exception; 
    2325 
     
    3335        private import tango.stdc.posix.unistd; 
    3436 
    35         private import tango.io.device.FileConduit; 
     37        //private import tango.io.device.FileConduit; 
    3638        private import Integer = tango.text.convert.Integer; 
    3739        } 
     
    5860        ***********************************************************************/ 
    5961 
    60         static FilePath toAbsolute (FilePath target, char[] prefix=null) 
     62        static FilePath toAbsolute (FilePath target, Cutf8 prefix=null) 
    6163        { 
    6264                if (! target.isAbsolute) 
     
    7375 
    7476                Convert the provided path to an absolute path, using the 
    75                 current working directory where prefix is not provided.  
    76                 If the given path is already an absolute path, return it  
     77                current working directory where prefix is not provided. 
     78                If the given path is already an absolute path, return it 
    7779                intact. 
    7880 
     
    8183        ***********************************************************************/ 
    8284 
    83         static char[] toAbsolute (char[] path, char[] prefix=null) 
     85        static Cutf8 toAbsolute (Cutf8 path, Cutf8 prefix=null) 
    8486        { 
    8587                scope target = new FilePath (path); 
     
    98100        ***********************************************************************/ 
    99101 
    100         static bool equals (char[] path1, char[] path2, char[] prefix=null) 
     102        static bool equals (Cutf8 path1, Cutf8 path2, Cutf8 prefix=null) 
    101103        { 
    102104                scope p1 = new FilePath (path1); 
     
    126128                ***************************************************************/ 
    127129 
    128                 static void setDirectory (char[] path) 
     130                static void setDirectory (Cutf8 path) 
    129131                { 
    130132                        version (Win32SansUnicode) 
     
    143145                                assert (path.length < tmp.length); 
    144146                                auto i = MultiByteToWideChar (CP_UTF8, 0, 
    145                                                               cast(PCHAR)path.ptr, path.length,  
     147                                                              cast(PCHAR)path.ptr, path.length, 
    146148                                                              tmp.ptr, tmp.length); 
    147149                                tmp[i] = 0; 
     
    158160                ***************************************************************/ 
    159161 
    160                 static char[] getDirectory () 
     162                static Cutf8 getDirectory () 
    161163                { 
    162164                        char[] path; 
     
    169171                                if (len) 
    170172                                   { 
    171                                    dir[len-1] = '/';                                    
     173                                   dir[len-1] = '/'; 
    172174                                   path = standard (dir); 
    173175                                   } 
     
    198200 
    199201                /*************************************************************** 
    200                          
     202 
    201203                        List the set of root devices (C:, D: etc) 
    202204 
     
    235237                ***************************************************************/ 
    236238 
    237                 static void setDirectory (char[] path) 
     239                static void setDirectory (Cutf8 path) 
    238240                { 
    239241                        char[512] tmp = void; 
     
    251253                ***************************************************************/ 
    252254 
    253                 static char[] getDirectory () 
     255                static Cutf8 getDirectory () 
    254256                { 
    255257                        char[512] tmp = void; 
     
    270272                 ***************************************************************/ 
    271273 
    272                 static char[][] roots () 
     274                static Cutf8[] roots () 
    273275                { 
    274276                        version(darwin) 
     
    278280                        else 
    279281                        { 
    280                             char[] path = ""
    281                             char[][] list; 
     282                            Cutf8 path
     283                            Cutf8[] list; 
    282284                            int spaces; 
    283285 
     
    285287                            scope (exit) 
    286288                                   fc.close; 
    287                              
     289 
    288290                            auto content = new char[cast(int) fc.length]; 
    289291                            fc.input.read (content); 
    290                              
     292 
    291293                            for(int i = 0; i < content.length; i++) 
    292294                            { 
     
    296298                                    spaces = 0; 
    297299                                    list ~= path; 
    298                                     path = ""
     300                                    path = null
    299301                                } 
    300302                                else if(spaces == 1) 
     
    308310                                } 
    309311                            } 
    310                              
     312 
    311313                            return list; 
    312314                        } 
  • branches/experimental/D2.0/tango/io/Path.d

    r3890 r3891  
    5353private import  tango.sys.Common; 
    5454 
    55 private import  tango.io.model.IFile : FileConst
     55private import  tango.io.model.IFile/+ : FileConst+/
    5656 
    5757public  import  tango.time.Time : Time, TimeSpan; 
    5858 
    59 public  import  tango.core.Exception : IOException, IllegalArgumentException
     59public  import  tango.core.Exception/+ : IOException, IllegalArgumentException+/
    6060 
    6161 
  • branches/experimental/D2.0/tango/io/TempFile.d

    r3888 r3891  
    7676                wchar[MAX_PATH+1] tmp = void; 
    7777                assert (fn.length < tmp.length); 
    78                 auto i = MultiByteToWideChar (CP_UTF8, 0, cast(PCHAR) fn.ptr,  
     78                auto i = MultiByteToWideChar (CP_UTF8, 0, cast(PCHAR) fn.ptr, 
    7979                                              fn.length, tmp.ptr, tmp.length); 
    8080                tmp[i] = 0; 
     
    9494 
    9595            auto dir = new char [len * 3]; 
    96             auto i = WideCharToMultiByte (CP_UTF8, 0, result.ptr, len,  
     96            auto i = WideCharToMultiByte (CP_UTF8, 0, result.ptr, len, 
    9797                                          cast(PCHAR) dir.ptr, dir.length, null, null); 
    9898            return Path.standard (dir[0..i]); 
     
    128128    import tango.stdc.posix.unistd : access, getuid, lseek, unlink, W_OK; 
    129129    import tango.stdc.posix.sys.stat : stat, stat_t; 
    130      
     130 
    131131    import tango.sys.Environment : Environment; 
    132132 
     
    181181 *  { 
    182182 *      scope temp = new TempFile; 
    183  *       
     183 * 
    184184 *      // Use temp as a normal conduit; it will be automatically closed when 
    185185 *      // it goes out of scope. 
     
    217217 
    218218    /************************************************************************** 
    219      *  
     219     * 
    220220     * This enumeration is used to control whether the temporary file should 
    221221     * persist after the TempFile object has been destroyed. 
     
    266266 
    267267    /************************************************************************** 
    268      *  
     268     * 
    269269     * This structure is used to determine how the temporary files should be 
    270270     * opened and used. 
     
    294294 
    295295    // Path to the temporary file 
    296     private char[] _path; 
     296    private Cutf8 _path; 
    297297 
    298298    // Style we've opened with 
     
    309309 
    310310    /// 
    311     this(char[] prefix, Style style = Style.init) 
     311    this(Cutf8 prefix, Style style = Style.init) 
    312312    { 
    313313        create (prefix, style); 
     
    332332     * 
    333333     **************************************************************************/ 
    334     char[] path() 
     334    Cutf8 path() 
    335335    { 
    336336        return _path; 
     
    347347    } 
    348348 
    349     override char[] toString() 
     349    override Cutf8 toString() 
    350350    { 
    351351        if( path.length > 0 ) 
     
    387387    } 
    388388 
    389     private void create(char[] prefix, Style style) 
     389    private void create(Cutf8 prefix, Style style) 
    390390    { 
    391391        for( size_t i=0; i<style.attempts; ++i ) 
     
    404404        private static const DEFAULT_SUFFIX = ".tmp"; 
    405405 
    406         private static const JUNK_CHARS =  
     406        private static const JUNK_CHARS = 
    407407            "abcdefghijklmnopqrstuvwxyz0123456789"; 
    408408 
     
    410410         * Returns the path to the temporary directory. 
    411411         */ 
    412         public static char[] tempPath() 
     412        public static Cutf8 tempPath() 
    413413        { 
    414414            return GetTempPath; 
     
    419419         * style. 
    420420         */ 
    421         private bool create_path(char[] path, Style style) 
     421        private bool create_path(Cutf8 path, Style style) 
    422422        { 
    423423            // TODO: Check permissions directly and throw an exception; 
     
    463463        { 
    464464            LONG high = cast(LONG) (offset >> 32); 
    465             long result = SetFilePointer (handle, cast(LONG) offset,  
     465            long result = SetFilePointer (handle, cast(LONG) offset, 
    466466                                          &high, anchor); 
    467467 
    468             if (result is -1 &&  
     468            if (result is -1 && 
    469469                GetLastError() != ERROR_SUCCESS) 
    470470                error(); 
     
    481481        private static const DEFAULT_SUFFIX = "~"; 
    482482 
    483         private static const JUNK_CHARS =  
     483        private static const JUNK_CHARS = 
    484484            "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
    485485            "abcdefghijklmnopqrstuvwxyz0123456789"; 
     
    488488         * Returns the path to the temporary directory. 
    489489         */ 
    490         public static char[] tempPath() 
     490        public static Cutf8 tempPath() 
    491491        { 
    492492            // Check for TMPDIR; failing that, use /tmp 
     
    501501         * style. 
    502502         */ 
    503         private bool create_path(char[] path, Style style) 
     503        private bool create_path(Cutf8 path, Style style) 
    504504        { 
    505505            // Check suitability 
     
    521521                if( pwe is null ) error("could not get root's uid"); 
    522522                auto root_uid = pwe.pw_uid; 
    523                  
     523 
    524524                // Make sure either we or root are the owner 
    525525                if( !(sb.st_uid == root_uid || sb.st_uid == getuid) ) 
     
    575575    { 
    576576        /********************************************************************** 
    577          *  
     577         * 
    578578         * Seeks the temporary file's cursor to the given location. 
    579579         * 
     
    582582 
    583583        /********************************************************************** 
    584          *  
     584         * 
    585585         * Returns the path to the directory where temporary files will be 
    586586         * created.  The returned path is safe to mutate. 
     
    597597     * Generates a new random file name, sans directory. 
    598598     */ 
    599     private char[] randomName(uint length=DEFAULT_LENGTH, 
    600             char[] prefix=DEFAULT_PREFIX, 
    601             char[] suffix=DEFAULT_SUFFIX) 
     599    private Cutf8 randomName(uint length=DEFAULT_LENGTH, 
     600            Cutf8 prefix=DEFAULT_PREFIX, 
     601            Cutf8 suffix=DEFAULT_SUFFIX) 
    602602    { 
    603603        auto junk = new char[length]; 
     
    609609        return prefix~junk~suffix; 
    610610    } 
    611      
     611 
    612612    override void detach() 
    613613    { 
  • branches/experimental/D2.0/tango/io/compress/Zip.d

    r3890 r3891  
    105105    static assert( Data.sizeof == 26 ); 
    106106 
    107     char[] file_name; 
     107    Cutf8 file_name; 
    108108    ubyte[] extra_field; 
    109109 
     
    264264    static assert( Data.sizeof == 42 ); 
    265265 
    266     char[] file_name; 
     266    Cutf8 file_name; 
    267267    ubyte[] extra_field; 
    268     char[] file_comment; 
     268    Cutf8 file_comment; 
    269269 
    270270    bool usingDataDescriptor() 
     
    341341        //debug(Zip) data.dump; 
    342342 
    343         char[] function(ubyte[]) conv_fn; 
     343        Cutf8 function(ubyte[]) conv_fn; 
    344344        if( usingUtf8 ) 
    345345            conv_fn = &cp437_to_utf8; 
     
    409409    static assert( data.sizeof == 18 ); 
    410410 
    411     char[] file_comment; 
     411    Cutf8 file_comment; 
    412412 
    413413    void[] data_arr() 
     
    445445        //data.dump; 
    446446 
    447         file_comment = cast(char[]) src[0..data.file_comment_length].dup; 
     447        file_comment = cast(Cutf8) src[0..data.file_comment_length].dup; 
    448448    } 
    449449} 
     
    542542{ 
    543543    void finish(); 
    544     void putFile(ZipEntryInfo info, char[] path); 
     544    void putFile(ZipEntryInfo info, Cutf8 path); 
    545545    deprecated void putFile(ZipEntryInfo info, PathView path); 
    546     void putFile(ZipEntryInfo info, char[] path); 
     546    void putFile(ZipEntryInfo info, Cutf8 path); 
    547547    void putStream(ZipEntryInfo info, InputStream source); 
    548548    void putEntry(ZipEntryInfo info, ZipEntry entry); 
     
    595595 
    596596    /// ditto 
    597     this(char[] path) 
     597    this(Cutf8 path) 
    598598    { 
    599599        file_source = new FileConduit(path); 
     
    10001000 
    10011001    /// ditto 
    1002     this(char[] path) 
     1002    this(Cutf8 path) 
    10031003    { 
    10041004        file_output = new FileConduit(path, FileConduit.WriteCreate); 
     
    10481048 
    10491049    /// ditto 
    1050     void putFile(ZipEntryInfo info, char[] path) 
     1050    void putFile(ZipEntryInfo info, Cutf8 path) 
    10511051    { 
    10521052        scope file = new FileConduit(path); 
     
    11021102        FileHeaderData data; 
    11031103        long header_position; 
    1104         char[] filename; 
    1105         char[] comment; 
     1104        Cutf8 filename; 
     1105        Cutf8 comment; 
    11061106        ubyte[] extra; 
    11071107    } 
     
    13301330     */ 
    13311331    void put_local_header(LocalFileHeaderData data, 
    1332             char[] file_name) 
     1332            Cutf8 file_name) 
    13331333    { 
    13341334        auto f_name = PathUtil.normalize(file_name); 
     
    15451545{ 
    15461546    /// Full path and file name of this file. 
    1547     char[] name; 
     1547    Cutf8 name; 
    15481548    /// Modification timestamp.  If this is left uninitialised when passed to 
    15491549    /// a ZipWriter, it will be reset to the current system time. 
    15501550    Time modified = Time.min; 
    15511551    /// Comment on the file. 
    1552     char[] comment; 
     1552    Cutf8 comment; 
    15531553} 
    15541554 
     
    15661566class ZipException : Exception 
    15671567{ 
    1568     this(char[] msg) { super(msg); } 
     1568    this(Cutf8 msg) { super(msg); } 
    15691569 
    15701570private: 
    15711571    alias typeof(this) thisT; 
    1572     static void opCall(char[] msg) { throw new ZipException(msg); } 
     1572    static void opCall(Cutf8 msg) { throw new ZipException(msg); } 
    15731573 
    15741574    static void badsig() 
     
    15771577    } 
    15781578 
    1579     static void badsig(char[] type) 
     1579    static void badsig(Cutf8 type) 
    15801580    { 
    15811581        thisT("corrupt "~type~" signature or unexpected section found"); 
    15821582    } 
    15831583 
    1584     static void incons(char[] name) 
     1584    static void incons(Cutf8 name) 
    15851585    { 
    15861586        thisT("inconsistent headers for file \""~name~"\"; " 
     
    16461646class ZipChecksumException : ZipException 
    16471647{ 
    1648     this(char[] name) 
     1648    this(Cutf8 name) 
    16491649    { 
    16501650        super("checksum failed on zip entry \""~name~"\""); 
     
    16521652 
    16531653private: 
    1654     static void opCall(char[] name) { throw new ZipChecksumException(name); } 
     1654    static void opCall(Cutf8 name) { throw new ZipChecksumException(name); } 
    16551655} 
    16561656 
     
    16731673class ZipNotSupportedException : ZipException 
    16741674{ 
    1675     this(char[] msg) { super(msg); } 
     1675    this(Cutf8 msg) { super(msg); } 
    16761676 
    16771677private: 
    16781678    alias ZipNotSupportedException thisT; 
    16791679 
    1680     static void opCall(char[] msg) 
     1680    static void opCall(Cutf8 msg) 
    16811681    { 
    16821682        throw new thisT(msg ~ " not supported"); 
     
    17091709    { 
    17101710        // Cheat here and work out what the method *actually* is 
    1711         char[] ms; 
     1711        Cutf8 ms; 
    17121712        switch( m ) 
    17131713        { 
     
    17461746// Convenience methods 
    17471747 
    1748 void createArchive(char[] archive, Method method, char[][] files...) 
     1748void createArchive(Cutf8 archive, Method method, Cutf8[] files...) 
    17491749{ 
    17501750    scope zw = new ZipBlockWriter(archive); 
     
    17681768} 
    17691769 
    1770 deprecated void extractArchive(FilePath archive, char[] folder) 
     1770deprecated void extractArchive(FilePath archive, Cutf8 folder) 
    17711771{ 
    17721772    extractArchive(archive, folder); 
     
    17781778} 
    17791779 
    1780 void extractArchive(char[] archive, char[] dest) 
     1780void extractArchive(Cutf8 archive, Cutf8 dest) 
    17811781{ 
    17821782    scope zr = new ZipBlockReader(archive); 
     
    19101910 * Really, seriously, write some bytes. 
    19111911 */ 
    1912 void writeExact(OutputStream s, void[] src) 
     1912void writeExact(OutputStream s, const(void)[] src) 
    19131913{ 
    19141914    while( src.length > 0 ) 
     
    19681968// 
    19691969 
    1970 const char[][] cp437_to_utf8_map_low = [ 
     1970const Cutf8[] cp437_to_utf8_map_low = [ 
    19711971    "\u0000"[], "\u263a",   "\u263b",   "\u2665", 
    19721972    "\u2666",   "\u2663",   "\u2660",   "\u2022", 
     
    19801980]; 
    19811981 
    1982 const char[][] cp437_to_utf8_map_high = [ 
     1982const Cutf8[] cp437_to_utf8_map_high = [ 
    19831983    "\u00c7"[], "\u00fc",   "\u00e9",   "\u00e2", 
    19841984    "\u00e4",   "\u00e0",   "\u00e5",   "\u00e7", 
     
    20212021]; 
    20222022 
    2023 char[] cp437_to_utf8(ubyte[] s) 
     2023Cutf8 cp437_to_utf8(ubyte[] s) 
    20242024{ 
    20252025    foreach( i,c ; s ) 
     
    20342034             */ 
    20352035            auto r = new char[i+2*(s.length-i)]; 
    2036             r[0..i] = cast(char[]) s[0..i]; 
     2036            r[0..i] = cast(Cutf8) s[0..i]; 
    20372037            size_t k=i; // current length 
    20382038 
     
    20472047                else if( 1 <= d && d <= 31 ) 
    20482048                { 
    2049                     char[] repl = cp437_to_utf8_map_low[d]; 
     2049                    Cutf8 repl = cp437_to_utf8_map_low[d]; 
    20502050                    r[k..k+repl.length] = repl[]; 
    20512051                    k += repl.length; 
     
    20532053                else if( d == 127 ) 
    20542054                { 
    2055                     char[] repl = "\u2302"; 
     2055                    Cutf8 repl = "\u2302"; 
    20562056                    r[k..k+repl.length] = repl[]; 
    20572057                    k += repl.length; 
     
    20592059                else if( d > 127 ) 
    20602060                { 
    2061                     char[] repl = cp437_to_utf8_map_high[d-128]; 
     2061                    Cutf8 repl = cp437_to_utf8_map_high[d-128]; 
    20622062                    r[k..k+repl.length] = repl[]; 
    20632063                    k += repl.length; 
     
    20742074     * means it's also valid UTF-8; return the string unmodified. 
    20752075     */ 
    2076     return cast(char[]) s; 
     2076    return cast(Cutf8) s; 
    20772077} 
    20782078 
     
    20812081    unittest 
    20822082    { 
    2083         char[] c(char[] s) { return cp437_to_utf8(cast(ubyte[]) s); } 
     2083        Cutf8 c(Cutf8 s) { return cp437_to_utf8(cast(ubyte[]) s); } 
    20842084 
    20852085        auto s = c("Hi there \x01 old \x0c!"); 
     
    21512151} 
    21522152 
    2153 ubyte[] utf8_to_cp437(char[] s) 
     2153ubyte[] utf8_to_cp437(Cutf8 s) 
    21542154{ 
    21552155    foreach( i,dchar c ; s ) 
     
    22342234 * This is here to simplify the code elsewhere. 
    22352235 */ 
    2236 char[] utf8_to_utf8(ubyte[] s) { return cast(char[]) s; } 
    2237 ubyte[] utf8_to_utf8(char[] s) { return cast(ubyte[]) s; } 
     2236Cutf8 utf8_to_utf8(ubyte[] s) { return cast(Cutf8) s; } 
     2237ubyte[] utf8_to_utf8(Cutf8 s) { return cast(ubyte[]) s; } 
    22382238 
    22392239////////////////////////////////////////////////////////////////////////////// 
     
    23892389    } 
    23902390 
    2391     override uint write(void[] dst) 
     2391    override uint write(const(void)[] dst) 
    23922392    { 
    23932393        auto wrote = output.write(dst); 
     
    26672667    } 
    26682668 
    2669     uint write(void[] src) 
     2669    override uint write(const(void)[] src) 
    26702670    { 
    26712671        // If we're at the end of the slice, return eof 
     
    29042904    } 
    29052905 
    2906     uint write(void[] src) 
     2906    override uint write(const(void)[] src) 
    29072907    { 
    29082908        if( seeker.seek(0, Anchor.Current) != _position ) 
  • branches/experimental/D2.0/tango/io/device/FileConduit.d

    r3888 r3891  
    55        license:        BSD style: $(LICENSE) 
    66 
    7         version:        Mar 2004: Initial release      
     7        version:        Mar 2004: Initial release 
    88                        Dec 2006: Outback release 
    9                          
    10         author:         Kris,  
    11                         John Reimer,  
     9 
     10        author:         Kris, 
     11                        John Reimer, 
    1212                        Anders F Bjorklund (Darwin patches), 
    1313                        Chris Sauls (Win95 file support) 
     
    4444        are the primary means of accessing external data and FileConduit 
    4545        extends the basic pattern by providing file-specific methods to 
    46         set the file size, seek to a specific file position and so on.  
    47          
     46        set the file size, seek to a specific file position and so on. 
     47 
    4848        Serial input and output is straightforward. In this example we 
    4949        copy a file directly to the console: 
     
    6464        to.output.copy (new FileConduit("test.txt")); 
    6565        --- 
    66          
     66 
    6767        To load a file directly into memory one might do this: 
    6868        --- 
     
    111111        --- 
    112112 
    113         See File, FilePath, FileScan, and FileSystem for  
    114         additional functionality related to file manipulation.  
    115  
    116         Compile with -version=Win32SansUnicode to enable Win95 & Win32s file  
     113        See File, FilePath, FileScan, and FileSystem for 
     114        additional functionality related to file manipulation. 
     115 
     116        Compile with -version=Win32SansUnicode to enable Win95 & Win32s file 
    117117        support. 
    118          
     118 
    119119*******************************************************************************/ 
    120120 
    121121class FileConduit : DeviceConduit, DeviceConduit.Seek 
    122122{ 
    123         /*********************************************************************** 
    124          
    125                 Fits into 32 bits ... 
    126  
    127         ***********************************************************************/ 
    128  
    129         struct Style 
    130         { 
    131                 align (1): 
    132  
    133                 Access          access;                 /// access rights 
    134                 Open            open;                   /// how to open 
    135                 Share           share;                  /// how to share 
    136                 Cache           cache;                  /// how to cache 
    137         } 
    138  
    139123        /*********************************************************************** 
    140124 
     
    148132 
    149133        /*********************************************************************** 
    150          
     134 
    151135        ***********************************************************************/ 
    152136 
     
    159143 
    160144        /*********************************************************************** 
    161          
     145 
    162146        ***********************************************************************/ 
    163147 
     
    169153 
    170154        /*********************************************************************** 
    171          
     155 
    172156        ***********************************************************************/ 
    173157 
     
    181165        /*********************************************************************** 
    182166 
     167                Fits into 32 bits ... 
     168 
     169        ***********************************************************************/ 
     170 
     171        struct Style 
     172        { 
     173                align (1): 
     174 
     175                Access          access;                 /// access rights 
     176                Open            open;                   /// how to open 
     177                Share           share;                  /// how to share 
     178                Cache           cache;                  /// how to cache 
     179        } 
     180 
     181        /*********************************************************************** 
     182 
    183183            Read an existing file 
    184          
     184 
    185185        ***********************************************************************/ 
    186186 
     
    188188 
    189189        /*********************************************************************** 
    190          
     190 
    191191                Write on an existing file. Do not create 
    192192 
     
    196196 
    197197        /*********************************************************************** 
    198          
     198 
    199199                Write on a clean file. Create if necessary 
    200200 
     
    204204 
    205205        /*********************************************************************** 
    206          
     206 
    207207                Write at the end of the file 
    208208 
     
    212212 
    213213        /*********************************************************************** 
    214          
     214 
    215215                Read and write an existing file 
    216216 
    217217        ***********************************************************************/ 
    218218 
    219         const Style ReadWriteExisting = {Access.ReadWrite, Open.Exists};  
    220  
    221         /*********************************************************************** 
    222          
     219        const Style ReadWriteExisting = {Access.ReadWrite, Open.Exists}; 
     220 
     221        /*********************************************************************** 
     222 
    223223                Read & write on a clean file. Create if necessary 
    224224 
    225225        ***********************************************************************/ 
    226226 
    227         const Style ReadWriteCreate = {Access.ReadWrite, Open.Create};  
    228  
    229         /*********************************************************************** 
    230          
     227        const Style ReadWriteCreate = {Access.ReadWrite, Open.Create}; 
     228 
     229        /*********************************************************************** 
     230 
    231231                Read and Write. Use existing file if present 
    232232 
    233233        ***********************************************************************/ 
    234234 
    235         const Style ReadWriteOpen = {Access.ReadWrite, Open.Sedate};  
    236  
    237  
    238  
    239  
    240         // the file we're working with  
     235        const Style ReadWriteOpen = {Access.ReadWrite, Open.Sedate}; 
     236 
     237 
     238 
     239 
     240        // the file we're working with 
    241241        private char[]  path_; 
    242242 
     
    245245 
    246246        /*********************************************************************** 
    247          
     247 
    248248                Create a FileConduit for use with open() 
    249249 
     
    255255 
    256256        /*********************************************************************** 
    257          
     257 
    258258                Create a FileConduit with the provided path and style. 
    259259 
    260260        ***********************************************************************/ 
    261261 
    262         this (char[] path, Style style = ReadExisting) 
     262        this (Cutf8 path, Style style = ReadExisting) 
    263263        { 
    264264                open (path, style); 
     
    266266 
    267267        /*********************************************************************** 
    268          
     268 
    269269                Create a FileConduit with the provided path and style. 
    270270 
     
    276276        { 
    277277                this (path.toString, style); 
    278         }     
    279  
    280         /*********************************************************************** 
    281          
     278        } 
     279 
     280        /*********************************************************************** 
     281 
    282282                Return the PathView used by this file. 
    283283 
     
    290290                // return something useful in the interim 
    291291                return new FilePath (path_); 
    292         }                
    293  
    294         /*********************************************************************** 
    295          
     292        } 
     293 
     294        /************************************************