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

Changeset 3346

Show
Ignore:
Timestamp:
03/13/08 04:34:07 (9 months ago)
Author:
lmartin92
Message:

Minor updates to FtpFolder?. Fixed some code and some comments and some constructors. Minor updates to FtpClient?. Fixed up some comments for code developed into it.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lmartin/ftp/tango/io/vfs/FtpFolder.d

    r3345 r3346  
    4040*******************************************************************************/ 
    4141 
    42  class FtpFolder : VfsFolder //finished 
     42 class FtpFolder : VfsFolder  
    4343{ 
    4444    char[]          _name, 
     
    279279    { 
    280280        _primaryFolders = fols; 
     281        foreach(folder; fols) 
     282        { 
     283            _primaryFolders ~= new FtpFolder(folder); 
     284        } 
    281285        populateFolders(false); 
    282286    } 
     
    284288    package this(FtpFolder fol, bool flat) 
    285289    { 
    286         _ftpFol = new FtpFolder(fol); 
    287         _primaryFolders ~= fol; 
     290        _primaryFolders ~= new FtpFolder(fol); 
    288291        _flat = flat; 
    289292        populateFolders(false); 
     
    331334        else  
    332335            _foldersPopulated = true; 
     336        for(int i = 0; i < _folders.length; i++) 
     337        { 
     338            for(int j = 0; j < _folders.length; j++) 
     339            { 
     340                if(_folders[i] == _folders[j]) 
     341                { 
     342                    FtpFolder[] temp = _folders.dup; 
     343                    _folders[0..j] = temp[0..j].dup; 
     344                    _folders[j..$] = temp[j..$].dup; 
     345                } 
     346            } 
     347        } 
    333348    } 
    334349 
     
    585600        istream.read(dest); 
    586601        os.write(dest); 
    587         return new FtpFile(this, _toString); 
     602        return new FtpFile(_folder, _toString); 
    588603    } 
    589604 
     
    598613        copy(source); 
    599614        source.remove(); 
    600         return new FtpFile(this, _toString); 
     615        return new FtpFile(_folder, _toString); 
    601616    } 
    602617 
     
    656671    ***********************************************************************/ 
    657672 
    658     //cant work until I make new FtpClient 
    659673    InputStream input () 
    660674    { 
     
    670684    ***********************************************************************/ 
    671685 
    672     //cant work until I make new FtpClient 
    673686    OutputStream output () 
    674687    { 
  • branches/lmartin/ftp/tango/net/ftp/FtpClient.d

    r3137 r3346  
    4040private import  Ascii = tango.text.Ascii; 
    4141 
    42 private import  tango.text.Regex : Regex; 
     42private import  Regex = tango.text.Regex; 
    4343 
    4444private import  Integer = tango.text.convert.Integer; 
     
    801801 
    802802                // Try to pull out the (possibly not parenthesized) address. 
    803                 auto r = Regex(`\([^0-9][^0-9][^0-9](\d+)[^0-9]\)`).search(response.message); 
     803                auto r = Regex.search(response.message, `\([^0-9][^0-9][^0-9](\d+)[^0-9]\)`); 
    804804                if (r is null) 
    805805                    throw new FTPException("CLIENT: Unable to parse address", "501"); 
     
    819819 
    820820                // Try to pull out the (possibly not parenthesized) address. 
    821                 auto r = Regex(`(\d+),\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d+)(,\s*(\d+))?`).search(response.message); 
     821                auto r = Regex.search(response.message, `(\d+),\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d+)(,\s*(\d+))?`); 
    822822                if (r is null) 
    823823                    throw new FTPException("CLIENT: Unable to parse address", "501"); 
     
    13431343 
    13441344                // The order is 1 MM, 2 DD, 3 YY, 4 HH, 5 MM, 6 P 
    1345                 auto r = Regex(`(\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d)(A|P)M`).search(line); 
     1345                auto r = Regex.search(line, `(\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d)(A|P)M`); 
    13461346                if (r is null) 
    13471347                    return info;