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()

Yes, open the connection first. You might want to check isOpen() to make sure it connected.

Cheers,
Greg

On May 4, 2013, at 8:33 AM, Jay Jay Billings <jayjaybillings@xxxxxxxxx> wrote:

Greg,

Thanks. I will try it again. I assume you set the working directory after the connection was opened?

Jay

-----
Jay Jay Billings
Computational Scientist
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

On May 3, 2013 5:05 PM, "Greg Watson" <g.watson@xxxxxxxxxxxx> wrote:
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

_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev
_______________________________________________
ptp-dev mailing list
ptp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ptp-dev


Back to the top