Home Download Buy Blog Forum Support

Is it possible to get a remote file path via ST2 plugin API?

Is it possible to get a remote file path via ST2 plugin API?

Postby BestGreek on Wed May 23, 2012 1:40 pm

When you open a file from an SFTP app like Transmit or Cyberduck ST2 displays the temporary file path. Is it possible via the plugin API to get the remote server file path?

Example:
Using Transmit open a file on a linux server at /etc/hosts

In ST2 it will show as ~/Library/Caches/Clean At Startup/Transmit/81790A16-CBF2-4CD3-A4E4-719AD5C7BD47/hosts

Is it possible through the plugin API to get that files real server path?

I want to know if its even possible because if so I'm going try to make a plugin to display the real server path instead of the local temp path.

Thank you,
BestGreek
 
Posts: 69
Joined: Wed Dec 14, 2011 9:02 pm

Re: Is it possible to get a remote file path via ST2 plugin API?

Postby BestGreek on Wed May 23, 2012 4:09 pm

I really don't know python but looking into to it this morning I don't think its possible. In os.path there isn't anything I can see that would have access to the remote server path, just the current temp folder path. I think this is possible but only from Apple's Cocco Framework file handler.

Objective-C has something like this

Code: Select all
externalPath = [[appleEventDescriptor paramDescriptorForKeyword:keyFileCustomPath] stringValue];


What I think is happening is that code is telling the OS to pretend the file is at the "CustomPath" instead of its real path. The result is when you open a remote file you can in the text editor display the files remote path.

Since ST2 is written in C++ I suspect it will never support native remote file path display. That is probably going to be a deal breaker for me. I really want to use this app but this one feature is a requirement for me workflow.
BestGreek
 
Posts: 69
Joined: Wed Dec 14, 2011 9:02 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests