How To Sync Visual Studio Code Local Files With Mapped File Server? - visual-studio-code

Here is a simple description of my problem. If you need more information please inquire.
I am not seeing any way that you would be able to sync files from my local computer to another file server. Is there a way that this would be possible using Visual Studio Code and a mapped network drive file server?
https://marketplace.visualstudio.com/search?term=sync&target=VSCode&category=All%20categories&sortBy=Relevance

You can sync files to another machine via a plugin called 'ftp-sync' this will allow you to send files to a destination via the FTP or SFTP protocol. This plugin also allows automatic upload on save (which is awesome).
See Url: https://marketplace.visualstudio.com/items?itemName=lukasz-wronski.ftp-sync

Related

Powershell copy vs move cmd

I'm running into some issues with my existing powershell script that copies data from a remote location into a local folder - that local folder also happens to be sync'd with google drive for desktop.
I'm seeing incomplete files being uploaded etc. In order to combat this I think it would be easier/better to change where the initial remote > local is putting its files, and instead of copying directly into the sync folder - copy into a temp/staging location that's NOT the sync folder.
Once that process is complete then use the powershell move-cmd to simply 'move' which will just update file locators to be that of the sync folder.
I think this will solve my issue.
Anyone see any problems with this approach?
If you have ruled out device connectivity, multiple files being uploaded at once vs. a single file being uploaded, and mobile device app or internet browser there is nothing wrong with your approach. If you need anymore assistance please reply to this thread or mark this as the answer.

Connect to Remote host (FTP) using VS Code Live Share

We are working on a website and all files are on a Linux Cpanel host. I can easily connect to the host using FileZilla, Open the files which need to be edited in VS Code and work on them with other members using Live Share and then upload back to server with FileZilla. However, this is a pain! Only the host computer can open files, save them and upload them back to server. I also tried SFTP extension by liximomo to shorten the process but as it opens the files on server and they're not downloaded to computer like FileZilla, others can't see the files.
Is there a way to open the whole remote host (using FTP) on VS Code so everyone (via Live Share) can browse files, open, edit and upload them without need to ask the host to do so?

How can an extension obtain remote URL of file in currently connected remote server?

I'm writing an extension targeted for VSCode Remote environment.
In this setup, one extension (UI extension) runs in client and another (workspace extension) runs in remote server.
Now, here's a question - is there any way to generate an URL that can be used by UI extension to access file on the server?
I know I can use vscode-remote://ssh-remote+<hostname>/file/on/server syntax to express this type of remote URL, but the issue here is that I cannot find any way for extension to discover one. Using vscode.Uri.file() API only generates file: URL, which is meaningless for UI extension running in client environment.
Since vscode-remote: scheme is fixed and ssh-remote part can be extracted from vscode.env.remoteName variable, the last piece I need is the hostname that was used to open current VSCode Remote session. Is there any API/variable to discover this?

How to get FTP-Simple working in Visual Studio Code?

I recently opted to start using Visual Studio Code. I want to connect to a remote server and edit files directly on the server. FTP-Simple seems like a great solution. But I am having a hard time understanding some basics about the program.
If I make a connection to a server, does FTP-Simple download all the actual files to my hard drive?
Also, I was able to make a connection, but in one of the directories there should be a sub-directory and it's missing. What am I doing wrong?
Can someone point me to some good documentation for this extension such as video(s), etc.
If I make a connection to a server, does FTP-Simple download all the
actual files to my hard drive?
Yes, It download all to your hard drive. you can find an address like below:
C:\Users\your user name\AppData\Roaming\Code\User\ftp-simple\remote-workspace-temp\cbc1ad9ed60f12ec861052806d7833db\httpdocs
for opening a directory in VSCode you can press F1 type ftp-config then click ftp-config:Open
and click on target directory you want to open for more information use this
2 years later and I'm having the same problem. I have already uninstalled ftp simple as well as VSC with no effect.
The plugin just doesn't download all the files on the FTP. It worked the first time I installed it for 2-3 weeks and then suddenly stopped being in sync with the FTP server.
There is a folder called "code" on mac in Library/Application Support where most of VSC data is saved, but deleting this didn't have an effect either. Perhaps it works for someone else, as this is apparently necessary to fully deinstall VSC.
I'd pay for good plugin that just allows to work remotely on ftp files!!

Zend Studio and remote host - best practice

Got the following:
Zend Studio
Zend Framework Project
Remote host with FTP and SSH (root access)
Want to:
Save directly to remote host.
Currently i'm working on a localhost *AMP server, manually updating the remote through FTP.
Have tried various ways to acomplish the above - unsuccessfull obviously.
Can some one tell me what to do? Studio 5 (pre-eclipse) was so much better for pure 'FTP programming'.
/Philip
Currently i'm using remote server support for synchronize my project directly with my i5 server.
It works using ftp or sfpt if you have enabled SSH on your server machine.
It works very well.
Before using remote server support you have to set up a connection
to the server: go to window menu > open perspective > other >
remote system explorer
set up a connection to your server
Return to php develop perspective
To add the "support to remote server" to an existing project, click on the project with rigth click > properties > Remote Server Support
Flag enable Remote connection properties
Set-up all properties and select upload files "on save"
In this way, ZS work locally on the file's project (index, build files ecc) and upload on the server only the .php and .js files.
It can works very well with svn suppor too, because it DOESEN'T upload (.svn) files to the server but keeps it local.
Whatever you do, don't use Expandrive. That's what I'm working with now, and it grinds ZSE to a crashing halt. Sometimes, Expandrive just stops working and ZSE thinks the file disappeared, so you have to close everything and anything not saved is lost.
EDIT: One solution that's worked for us is using the SMB protocol, using Windows' SMB compatibility to create a remote drive, and then interacting with your code base that way. Make sure to ignore building large static files or large files you won't be directly editing to further speed up Eclipse when building a project this way.
You can use 3rd party utilities:
Expandrive for OSX
Netdrive (commercial) or FTPDrive (free)
to mount FTP/SFTP to drive or folder so you can work as it is locally.