vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Brandneu! sevEingabe v3.0 - Das Eingabecontrol der Superlative!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Fortgeschrittene
Re: Download verzeichnis bestimmen 
Autor: marina
Datum: 25.08.06 16:06

Klar !!!! Ich habe aber auch nicht alles selber implemntiert, nur erweitert. Man muss je den Rad nicht neu erfinden.

Das ist erstmal die FTPLib in C#. Es ist hier zwar als Lib, aber Du kannst ja daraus eine Klasse machen. Teil 1


using System;
using System.Net;
using System.IO;
using System.Text;
using System.Net.Sockets;

namespace FtpLib
{

public class FTPFactory
{

private string
remoteHost,remotePath,remoteUser,remotePass,mes;
private int remotePort,bytes;
private Socket clientSocket;

private int retValue;
private Boolean debug=true;
private Boolean logined;
private string reply;

private static int BLOCK_SIZE = 512;

Byte[] buffer = new Byte[BLOCK_SIZE];
Encoding ASCII = Encoding.ASCII;

public FTPFactory()
{

remoteHost = "localhost";
remotePath = ".";
remoteUser = "anonymous";
remotePass = "jaimon@school2000.co.uk";
remotePort = 21;
debug = false;
logined = false;

}

///
/// Set the name of the FTP server to connect to.
///
/// Server name
public void setRemoteHost(string remoteHost)
{
this.remoteHost = remoteHost;
}

///
/// Return the name of the current FTP server.
///
/// Server name
public string getRemoteHost()
{
return remoteHost;
}

///
/// Set the port number to use for FTP.
///
/// Port number
public void setRemotePort(int remotePort)
{
this.remotePort = remotePort;
}

///
/// Return the current port number.
///
/// Current port number
public int getRemotePort()
{
return remotePort;
}

///
/// Set the remote directory path.
///
/// The remote directory path
public void setRemotePath(string remotePath)
{
this.remotePath = remotePath;
}

///
/// Return the current remote directory path.
///
/// The current remote directory path.
public string getRemotePath()
{
return remotePath;
}

///
/// Set the user name to use for logging into the remote server.
///
/// Username
public void setRemoteUser(string remoteUser)
{
this.remoteUser = remoteUser;
}

///
/// Set the password to user for logging into the remote server.
///
/// Password
public void setRemotePass(string remotePass)
{
this.remotePass = remotePass;
}

///
/// Return a string array containing the remote directory's.
///
///
///
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Download verzeichnis bestimmen1.191marina25.08.06 10:13
Re: Download verzeichnis bestimmen744ModeratorFZelle25.08.06 11:45
Re: Download verzeichnis bestimmen732marina25.08.06 11:48
Re: Download verzeichnis bestimmen731uliop197825.08.06 14:16
Re: Download verzeichnis bestimmen712ModeratorFZelle25.08.06 14:24
Re: Download verzeichnis bestimmen770uliop197825.08.06 14:35
Re: Download verzeichnis bestimmen773ModeratorFZelle27.08.06 20:01
Re: Download verzeichnis bestimmen758uliop197828.08.06 10:42
Re: Download verzeichnis bestimmen856ModeratorFZelle28.08.06 20:19
Re: Download verzeichnis bestimmen771uliop197829.08.06 09:08
Re: Download verzeichnis bestimmen780marina25.08.06 16:06
Re: Download verzeichnis bestimmen753marina25.08.06 16:08
Re: Download verzeichnis bestimmen694marina25.08.06 16:10
Re: Download verzeichnis bestimmen810marina25.08.06 16:11
Re: Download verzeichnis bestimmen694marina25.08.06 16:11
Re: Download verzeichnis bestimmen742marina25.08.06 16:09
Re: Download verzeichnis bestimmen765uliop197825.08.06 16:56
Re: Download verzeichnis bestimmen740marina25.08.06 18:01

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel