Documentation
¶
Index ¶
- func FileMatchList(dir string, regexp string) (matches []string)
- func ParseDateTime(fields []string) (mtime time.Time, err error)
- func ParseDosDateTime(input string) (dateTime time.Time, err error)
- func ReadFileList(filename string) []string
- func Readln(r *bufio.Reader) (string, error)
- func SaveFile(filename string, text []byte) error
- type Ftp
- func (c *Ftp) Abort() error
- func (c *Ftp) Cdup() error
- func (c *Ftp) Cwd(path string) error
- func (c *Ftp) Delete(path string) error
- func (c *Ftp) Dir(args ...string) (infos []*FtpFile, err error)
- func (c *Ftp) List(args ...string) (lines []string, err error)
- func (c *Ftp) ListRequest(args ...string) (io.ReadCloser, error)
- func (c *Ftp) Login(user, password string) error
- func (c *Ftp) Mkd(path string) (string, error)
- func (c *Ftp) Nlst(args ...string) (lines []string, err error)
- func (c *Ftp) NlstRequest(args ...string) (io.ReadCloser, error)
- func (c *Ftp) Noop() error
- func (c *Ftp) Pasv() (host string, port int, err error)
- func (c *Ftp) Port(host string, port int) error
- func (c *Ftp) Pwd() (string, error)
- func (c *Ftp) Quit() error
- func (c *Ftp) ReadResponse(expectCode int, t time.Time) (int, string, error)
- func (c *Ftp) Rein() error
- func (c *Ftp) Rename(from, to string) error
- func (c *Ftp) Rest(offset uint64) error
- func (c *Ftp) Retr(path string) error
- func (c *Ftp) RetrFile(remote, local string) error
- func (c *Ftp) RetrRequest(path string) (io.ReadCloser, error)
- func (c *Ftp) Rmd(path string) error
- func (c *Ftp) SendCmd(expectCode int, format string, args ...interface{}) (int, string, error)
- func (c *Ftp) SetPasv(ispassive bool)
- func (c *Ftp) Size(filename string) (int, error)
- func (c *Ftp) Stor(path string) error
- func (c *Ftp) StorFile(local, remote string) error
- func (c *Ftp) StorRequest(path string) (io.WriteCloser, error)
- func (c *Ftp) Type(param string) error
- type FtpDataConnector
- type FtpFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileMatchList ¶
FileMatchList dir search
func ParseDateTime ¶
ParseDateTime parse date
func ParseDosDateTime ¶
ParseDosDateTime file time parse for DOS
Types ¶
type Ftp ¶
type Ftp struct {
// contains filtered or unexported fields
}
Ftp struct
func FtpConnect ¶
FtpConnect Connect to server
func (*Ftp) Cdup ¶
Cdup issues a CDUP FTP command, which changes the current directory to the parent directory. This is similar to a call to ChangeDir with a path set to "..".
func (*Ftp) Cwd ¶
Cwd issues a CWD FTP command, which changes the current directory to the specified path.
func (*Ftp) Delete ¶
Delete issues a DELE FTP command to delete the specified file from the remote FTP server.
func (*Ftp) ListRequest ¶
func (c *Ftp) ListRequest(args ...string) (io.ReadCloser, error)
ListRequest issues a LIST FTP command.
func (*Ftp) Mkd ¶
Mkd issues a MKD FTP command to create the specified directory on the remote FTP server.
func (*Ftp) NlstRequest ¶
func (c *Ftp) NlstRequest(args ...string) (io.ReadCloser, error)
NlstRequest issues an NLST FTP command.
func (*Ftp) Noop ¶
Noop has no effects and is usually used to prevent the remote FTP server to close the otherwise idle connection.
func (*Ftp) Quit ¶
Quit issues a QUIT FTP command to properly close the connection from the remote FTP server.
func (*Ftp) ReadResponse ¶
ReadResponse issues a FTP command response
func (*Ftp) Rein ¶
Rein issues a REIN FTP command to logout the current user. ftp server optional command.
func (*Ftp) Retr ¶
Retr issues a RETR FTP command to fetch the specified file from the remote FTP server
func (*Ftp) RetrFile ¶
RetrFile issues a RETR FTP command to fetch the specified file from the remote FTP server
func (*Ftp) RetrRequest ¶
func (c *Ftp) RetrRequest(path string) (io.ReadCloser, error)
RetrRequest issues a RETR FTP command to fetch the specified file from the remote FTP server The returned ReadCloser must be closed to cleanup the FTP data connection.
func (*Ftp) Rmd ¶
Rmd issues a RMD FTP command to remove the specified directory from the remote FTP server.
func (*Ftp) SendCmd ¶
SendCmd Send a simple command string to the server and return the code and response string.
func (*Ftp) Size ¶
Size Request the size of the file named filename on the server. On success, the size of the file is returned as an integer. ftp server extension command.
func (*Ftp) StorRequest ¶
func (c *Ftp) StorRequest(path string) (io.WriteCloser, error)
StorRequest issues a STOR FTP command to store a file to the remote FTP server. The returned WriteCloser must be closed to cleanup the FTP data connection.
type FtpDataConnector ¶
type FtpDataConnector struct {
// contains filtered or unexported fields
}
FtpDataConnector data connection
type FtpFile ¶
type FtpFile struct {
// contains filtered or unexported fields
}
FtpFile struct
func ParseDosFormat ¶
ParseDosFormat file time parse for DOS
func ParseUnixFormat ¶
ParseUnixFormat file time parse for UNIX