1Net::SSH2::SFTP(3)    User Contributed Perl Documentation   Net::SSH2::SFTP(3)
2
3
4

NAME

6       Net::SSH2::SFTP - SSH 2 Secure FTP object
7

DESCRIPTION

9       An SFTP object is created by the Net::SSH2 "sftp" method.
10
11       error
12
13       Returns the last SFTP error (one of the LIBSSH2_FX_* constants).  Use
14       this when Net::SSH2::error returns LIBSSH2_ERROR_SFTP_PROTOCOL.  In
15       list context, returns (code, error name).
16
17       open ( file [, flags [, mode ]]] )
18
19       Open or create a file on the remote host.  The flags are the standard
20       O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, O_CREAT, O_TRUNC, and O_EXCL,
21       which may be combined as usual.  Flags default to O_RDONLY and mode to
22       0666 (create only).  Returns a Net::SSH2::File object on success.
23
24       opendir ( dir )
25
26       Open a directory on the remote host; returns a Net::SSH2::Dir object on
27       success.
28
29       unlink ( file )
30
31       Delete the remote file.
32
33       rename ( old, new [, flags ] )
34
35       Rename old to new.  Flags are taken from LIBSSH2_SFTP_RENAME_*, and may
36       be combined; the default is to use all (overwrite, atomic, native).
37
38       mkdir ( path [, mode ] )
39
40       Create directory; mode defaults to 0777.
41
42       rmdir ( path )
43
44       Remove directory.
45
46       stat ( path [, follow ] )
47
48       Get file attributes for the given path.  If follow is set (default),
49       will follow symbolic links.  On success, returns a hash containing the
50       following:
51
52       mode
53       size
54       uid
55       gid
56       atime
57       mtime
58
59       setstat ( path, key, value... )
60
61       Set file attributes for given path; keys are the same as those returned
62       by stat; note that it's not necessary to pass them all.
63
64       symlink ( path, target [, type ] )
65
66       Create a symbolic link to a given target.
67
68       readlink ( path )
69
70       Return the target of the given link, undef on failure.
71
72       realpath ( path )
73
74       Resolve a filename's path; returns the resolved path, or undef on
75       error.
76

SEE ALSO

78       Net::SSH2.
79

AUTHOR

81       David B. Robins, <dbrobins@cpan.org>
82
84       Copyright (C) 2005, 2006 by David B. Robins; all rights reserved.
85
86       This library is free software; you can redistribute it and/or modify it
87       under the same terms as Perl itself, either Perl version 5.8.0 or, at
88       your option, any later version of Perl 5 you may have available.
89
90
91
92perl v5.8.8                       2007-02-24                Net::SSH2::SFTP(3)
Impressum