vscode-sftp icon indicating copy to clipboard operation
vscode-sftp copied to clipboard

FEATURE REQUEST: Delete/move local and remote

Open fabrazer opened this issue 6 years ago • 13 comments

Expected Behavior

In reference to following issue: #262

All local file (and folder) operations in VS Code should also be performed remotely.

I want to keep remote file operations in Remote Explorer.

For what reason? In my oppinion this only increases the workload.

Actual Behavior

Files are often renamed, moved or deleted. All these operations are not performed remotely, which leads to unnecessary files on the remote server.

Steps to Reproduce the Problem

  1. Create a file locally
  2. Rename or delete this file
  3. Take a look on the remote server -> the initial file can still be found on the remote server

Specifications

  • Version: 1.5.7
  • Platform: Windows 10 64bit

fabrazer avatar Sep 19 '18 14:09 fabrazer

You can remove unwanted files from remote with SFTP: Sync to Remote. This will make sure the remote is exactly the same with local.

liximomo avatar Sep 20 '18 01:09 liximomo

Yeah, that's right. But that is another manual step that I would like to avoid. It could also be forgotten in everyday working life. Therefore, it is important for me that this happens automatically with the local operation.

Is there a way to trigger SFTP: Sync to Remote automatically together with the update / delete oparations? This would help for the moment.

Thank you!

fabrazer avatar Sep 20 '18 07:09 fabrazer

+1 to this, I think it would be ideal to have a dropdown menu in the Right menu, and there we could select: remove local and remote, rename local and remote, etc.

gsabater avatar Sep 20 '18 11:09 gsabater

@Fabrazer @gergokoos rename and remove will come soon.

liximomo avatar Sep 21 '18 02:09 liximomo

Experimenting more on this, sync local -> remote lets you select a folder, but i couldn't find how to select a subfolder. I wanted to sync /root/foo, and it synced all /root with all their subfolders in a very big project.

In addition to add options like rename local and remote file/folder, remove local and remote file/folder, etc, i think that the sync local -> remote options should be done for the file or level you have opened / selected in the sidebar.

gsabater avatar Oct 25 '18 08:10 gsabater

As a user coming from NetBeans. The lack of this feature feels crippling to me. True local to remote syncing would automatically handle this when a file is moved, removed, deleted, or renamed.

The primary situation in which this is super useful is if you're pulling a branch or checking out another branch, remote behaves accordingly.

The manual sync to server is not ideal, as sometimes we need to work with very large code bases, and a full sync takes forever.

mstonepc avatar Nov 16 '18 14:11 mstonepc

@mstonepc

The primary situation in which this is super useful is if you're pulling a branch or checking out another branch, remote behaves accordingly.

How does delete local and remote work in this situation? If a branch checking out result a file get removed from local. How could you run delete local and remote on an removed file?

liximomo avatar Nov 17 '18 00:11 liximomo

How does delete local and remote work in this situation? It a branch checking out result a file get removed from local. How could you run delete local and remote on an removed file?

You wouldn't.. you would just sync the local changes to remote. The watcher should be able to handle this scenario. The main point of this request is not having to remember to manually duplicate these actions on the server.

mstonepc avatar Nov 19 '18 19:11 mstonepc

i need this This needs to be implemented ASAP! make any changes in loacal, reflected on the remote server!

CWrecker avatar Dec 10 '18 19:12 CWrecker

You can remove unwanted files from remote with SFTP: Sync to Remote. This will make sure the remote is exactly the same with local.

I get an error whenever i do this: :/ device or resource busy

[error] Error: /: Device or resource busy at v (C:\Users\Camden_2.vscode\extensions\liximomo.sftp-1.8.1\dist\extension.js:70:106078) at d. (C:\Users\Camden_2.vscode\extensions\liximomo.sftp-1.8.1\dist\extension.js:70:106801) at emitTwo (events.js:126:13) at d.emit (events.js:214:7) at d._write (C:\Users\Camden_2.vscode\extensions\liximomo.sftp-1.8.1\dist\extension.js:70:119623) at doWrite (_stream_writable.js:387:12) at writeOrBuffer (_stream_writable.js:373:5) at d.Writable.write (_stream_writable.js:290:11) at Socket.p (C:\Users\Camden_2.vscode\extensions\liximomo.sftp-1.8.1\dist\extension.js:70:109172) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (_stream_readable.js:263:12) at readableAddChunk (_stream_readable.js:250:11) at Socket.Readable.push (_stream_readable.js:208:10) at TCP.onread (net.js:594:20)

@liximomo please help me out here! slightly annoying! i think this should be automatic, as suggested above!

CWrecker avatar Dec 10 '18 20:12 CWrecker

@mstonepc

"watcher": {
  files: "**/*",
  "autoUpload": true,
  "autoDelete": false
}

liximomo avatar Jan 23 '19 03:01 liximomo

I would be glad to see an option for this behavior. By this I mean that if I want the local actions be performed remotely, I can set the config for this. In most of my projects the sync local > remote will take way too long. But the user should decide what behavior is the right for his environment.

Dshosev avatar Jul 02 '19 10:07 Dshosev

Is there any indication when this would be released?

mesllo avatar Mar 28 '22 23:03 mesllo