Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Commons Wiki" for 
change notification.

The following page has been changed by KenTanaka:
http://wiki.apache.org/jakarta-commons/SimpleSftpFileDownload

The comment on the change is:
Minor correction. Renamed local directory in example

------------------------------------------------------------------------------
  This is a basic example to use VFS to retrieve files from a remote system 
using the SFTP protocol. Files matching a specified regular expression are 
retrieved.
  
  = Example Configuration =
- For the purposes of this example the remote system is named 
"'''sftpremote.example.com'''". The files to be retrieved are in a directory 
named '''/data/source/fires''' and the files are named 
'''smoke'''''!YearMoDy'''''_wkt.txt'''. Thus the data file for March 25, 2008 
is named "smoke20080325_wkt.txt".
+ For the purposes of this example the remote system is named 
"'''sftpremote.example.com'''". The files to be retrieved are in a directory 
named '''/data/source/fires/smoke''' and the files are named 
'''smoke'''''!YearMoDy'''''_wkt.txt'''. Thus the data file for March 25, 2008 
is named "smoke20080325_wkt.txt".
  
- The downloaded files will be received in the local directory 
'''/extra/data/fires/smoke'''.
+ The downloaded files will be received in the local directory 
'''/local/received/fires/smoke'''.
  
  Connect to the remote sftpremote.example.com system using the login "smokey" 
and password "bear".
  
@@ -142, +142 @@

      // Look for a file path like "smoke20070128_wkt.txt"
      private String filePatternString = ".*/smoke\\d{8}_wkt\\.txt";
      // Local directory to receive file
-     private String localDir = "/extra/data/fires/smoke";
+     private String localDir = "/local/received/fires/smoke";
      
      
      private File localDirFile;
@@ -303, +303 @@

  Examining remote file 
sftp://sftpremote.example.com/data/source/fires/smoke/README.txt
    Filename does not match, skipping file ./README.txt
  Examining remote file 
sftp://sftpremote.example.com/data/source/fires/smoke/smoke20070328_wkt.txt
-   Standard local path is /extra/data/fires/smoke/smoke20070328_wkt.txt
+   Standard local path is /local/received/fires/smoke/smoke20070328_wkt.txt
-     Resolved local file name: 
file:///extra/data/fires/smoke/smoke20070328_wkt.txt
+     Resolved local file name: 
file:///local/received/fires/smoke/smoke20070328_wkt.txt
    ### Retrieving file ###
  Examining remote file 
sftp://sftpremote.example.com/data/source/fires/smoke/smoke20070426_wkt.txt
-   Standard local path is /extra/data/fires/smoke/smoke20070426_wkt.txt
+   Standard local path is /local/received/fires/smoke/smoke20070426_wkt.txt
-     Resolved local file name: 
file:///extra/data/fires/smoke/smoke20070426_wkt.txt
+     Resolved local file name: 
file:///local/received/fires/smoke/smoke20070426_wkt.txt
    ### Retrieving file ###
  Examining remote file 
sftp://sftpremote.example.com/data/source/fires/smoke/smoke20070430.txt
    Filename does not match, skipping file ./smoke20070430.txt
  }}}
- There should now be files matching the {{{filePatternString}}} in the local 
machine directory "/extra/data/fires/smoke".
+ There should now be files matching the {{{filePatternString}}} in the local 
machine directory "/local/received/fires/smoke".
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to