Ejemplo n.º 1
0
 internal FtpFile(FtpDirectory parent, ref ItemInfo info)
 {
     m_parent	= parent;
     m_name		= info.name;
     m_size		= info.size;
     m_permission= info.permission;
 }
Ejemplo n.º 2
0
        internal FtpFileTransferer(FtpDirectory transferStarter, string localFile, string remoteFile, long totalBytes, TransferDirection dir)
        {
            m_transferStarter	= transferStarter;
            m_transferDirection = dir;
            m_session		= transferStarter.FtpSession;
            m_localFile		= localFile;
            m_remoteFile	= remoteFile;
            m_totalBytes	= totalBytes;

            if(dir == TransferDirection.Upload) {
                m_beginEvent = new FileEventDelegate(m_session.Host.RaiseBeginPutFileEvent);
                m_endEvent	 = new FileEventDelegate(m_session.Host.RaiseEndPutFile);
                m_streamCopyRoutine		= new StreamCopyDelegate(LocalToRemote);
                m_ftpFileCommandRoutine = new FtpDelegate(m_session.ControlChannel.STOR);
                m_localFileOpenMode = FileMode.Open;
            }else {
                m_beginEvent = new FileEventDelegate(m_session.Host.RaiseBeginGetFileEvent);
                m_endEvent	 = new FileEventDelegate(m_session.Host.RaiseEndGetFile);
                m_streamCopyRoutine		= new StreamCopyDelegate(RemoteToLocal);
                m_ftpFileCommandRoutine = new FtpDelegate(m_session.ControlChannel.RETR);
                m_localFileOpenMode = FileMode.Create;
            }
        }
Ejemplo n.º 3
0
 internal void InitRootDirectory()
 {
     m_root		= new FtpDirectory(this);
     m_current	= m_root;
 }
Ejemplo n.º 4
0
 internal FtpFile(FtpDirectory parent, string name)
 {
     m_parent	= parent;
     m_name		= name;
 }