Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Proper use of IRemoteConnection.setWorkingDirectory()

Jay,

I just tried:

connection.setWorkingDirectory("/tmp");
String wd = connection.getWorkingDirectory();
System.out.println("wd = " + wd);

and it prints:

wd = /tmp

So I'm not sure what is going wrong. In fact, looking at the code, the only way this would not work is if the path is not absolute.

Greg

On May 1, 2013, at 4:36 PM, Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:

> Everyone,
> 
> I am trying to set the working directory of a remote connection by calling IRemoteConnection.setWorkingDirectory(). The JavaDoc says that the path specified needs to be absolute and valid, so I am sending the name of a previously created (~6months back) directory called, for example, /home/jay/scratch. However, calling IRemoteConnection.getWorkingDirectory() always returns the original working directory, in this case /home/jay.
> 
> My code is essentially the same as:
> 
> connection.setAddress(host);
> connection.setUsername(name);
> connection.setPassword(password);
> connection.open(null);
> connection.setWorkingDirectory("/home/jay/scratch");
> 
> Am I missing something?
> 
> Thanks for your time!
> 
> Jay
> 
> -- 
> Jay Jay Billings
> Oak Ridge National Laboratory
> Twitter Handle: @jayjaybillings
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev



Back to the top