Autor Beitrag
Sidi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 47


Delphi XE5 Prof.
BeitragVerfasst: Sa 01.12.07 23:33 
Hallo zusammen,

ich suche einem Möglichkeit bei der Client-Komponente TidFTP Fehler bei z.B. nicht erfolgreicher Erstellung eines Verzeichnisses anzuzeigen.

Mit der NMFTP Komponente funktionierte das mit NMFTP1Failure, ich konnte mit

case Trans_Type of
cmdMakeDir : begin Aktion end;

auf Fehler reagieren, etwas ähnliches habe ich bei TidFTP nicht gefunden, wer weiß Rat?

Gruß
Sidi
little-wolf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 47

WinXP
Delphi 5 Enterprise, Delphi 2006 Enterprise
BeitragVerfasst: Mi 23.04.08 12:26 
hallo sidi

hab da was in der delphi-hilfe gefunden, was dir evtl. weiterhelfen kann...

Auszug aus der Delphi Hilfe:
FTP Protocol Replies
Replies to File Transfer Protocol commands are devised to ensure the synchronization of requests and actions in the process of file transfer, and to guarantee that the user process always knows the state of the Server. Every command must generate at least one reply, although there may be more than one; in the latter case, the multiple replies must be easily distinguished. In addition, some commands occur in sequential groups, such as USER, PASS and ACCT, or RNFR and RNTO. The replies show the existence of an intermediate state if all preceding commands have been successful. A failure at any point in the sequence necessitates the repetition of the entire sequence from the beginning.
FTP reply values can be accessed using the LastCmdResult property, and consists of a 3-digit numeric response number followed by some arbitrary text. The response number is intended for use by automata to determine what state to enter next; the text is intended for the human user. It is intended that the three digits contain enough encoded information that the control channel will not need to examine the text and may either discard it or pass it on to the user, as appropriate. In particular, the text may be server-dependent, so there are likely to be varying texts for each reply code.

The three digits of the reply each have a special significance. This is intended to allow a range of very simple to very sophisticated responses by the user-process. The first digit denotes whether the response is good, bad or incomplete. The FTP client can determine its next course of action by simply examining this first digit in the numeric response. For more detailed information about a numeric response code, the FTP client may examine the second digit, reserving the third digit for the finest gradation of information (e.g., RNTO command without a preceding RNFR).

There are five values for the first digit of the reply code:


Code Meaning
1xx Positive Preliminary reply. The requested action is being initiated, but expect another reply before proceeding with a new command.
2xx Positive Completion reply. The requested action has been successfully completed. A new request may be initiated.
3xx Positive Intermediate reply. The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. The user should send another command specifying this information.
4xx Transient Negative Completion reply. The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again.
5xx Permanent Negative Completion reply. The command was not accepted and the requested action did not take place. The client is discouraged from repeating the exact request (in the same sequence).

The second digit in a numeric response code encodes the following functional groupings:


Code Meaning
x0x Syntax. These replies refer to syntax errors, syntactically correct commands that don't fit any functional category, unimplemented or superfluous commands.
x1x Information. These are replies to requests for information, such as status or help.
x2x Connections. Replies referring to the control and data connections.
x3x Authentication and accounting. Replies for the login process and accounting procedures.
x4x Unspecified as yet. x5x File system. These replies indicate the status of the Server file system for the requested file transfer or other file system action.

The third digit in the numeric response code provides the finest gradation of meaning in each of the function categories. The text associated with each reply is recommended, rather than mandatory, and may even change according to the command with which it is associated. The reply codes, on the other hand, must strictly follow the specifications in the last section; that is, Server implementations should not invent new codes for situations that are only slightly different from the ones described here, but rather should adapt codes already defined.

The following list indicates the numeric FTP reply codes and their suggested textual content for a typical FTP server implementation:


Code Message
110 MARK yyyy = mmmm
120 Service ready in nnn minutes.
125 Data connection already open; transfer starting.
150 File status okay; about to open data connection.
200 Command okay.
202 Command not implemented, superfluous at this site.
211 System status, or system help reply.
212 Directory status.
213 File status.
214 Help message.
215 NAME system type.
220 Service ready for new user.
221 Service closing control connection.
225 Data connection open; no transfer in progress.
226 Closing data connection.
227 Entering Passive Mode (h1,h2,h3,h4,p1,p2).
230 User logged in, proceed.
250 Requested file action okay, completed.
257 "PATHNAME" created.
331 User name okay, need password.
332 Need account for login.
350 Requested file action pending further information.
421 Service not available, closing control connection.
425 Can't open data connection.
426 Connection closed; transfer aborted.
450 Requested file action not taken.
451 Requested action aborted: local error in processing.
452 Requested action not taken.
500 Syntax error, command unrecognized.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken.
551 Requested action aborted: page type unknown.
552 Requested file action aborted.
553 Requested action not taken.

Direkter Link aus der Delphi 2006-Hilfe:
ms-help://borland.bds4/indy10/frames.html?frmname=topic&frmfile=TIdFTP.html


gruss

little-wolf