deadlyjack / Acode

Acode - powerful text/code editor for android
https://acode.app
MIT License
2.87k stars 393 forks source link

Add support for SFTP symlinks #1076

Open coder-newcomer opened 2 days ago

coder-newcomer commented 2 days ago

Check for existing issues

Describe the feature

Actually the main goal is support for Acode to be able to read directory or file symlinks.

Screenshot_2024-11-14-11-01-20-753_com foxdebug acode (storage folder accessed via SFTP which contains symlinked directory created by termux-setup-storage command)

I'm working NodeJS coding files inside Termux and pnpm usually work managing package by using symlinks. However Android Internal Storage is an emulated filesystem that doesn't support symlinks (or I suppose permission restrictions because I'm in non-root device) so I can't put my work on Internal Storage and instead keep it inside Termux.

Screenshot_2024-11-14-10-55-32-220_com termux (Symlinks created using termux-setup-storage command)

Now accessing the Termux private storage is the challenge, my first workaround is by using Termux storage access provided from DocumentsUI. It works quite well, however it's comes to an issue that it doesn't support rename operation, this could be a hassle.

Screenshot_2024-11-14-11-09-34-317_me zhanghai android files (Try to rename file using Material Files with Termux private directory access via DocumentsUI)

Another workaround is by using a file server, I had thought about setting up an FTP server in Termux but I haven't found the right tool for it. So I thought about using SSH instead. I set up an SSH server with Termux-SSH and it works fine, except for the symlinks support so I can access both Internal Storage and SD Card in the same place. This is just a small request actually, I hope it can be easily implemented...


I once use Acode plugin called AcodeX which allow to execute Termux command inside the editor. However you need to install NodeJS package acodex-server to be installed and running as well. But I thought using SSH feature directly within AcodeX without any bridge (except the SSH server itself) would be a better approach.

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot_2024-11-14-10-58-10-158_com cxinventor file explorer (Cx File Explorer able to list symlinks)

bajrangCoder commented 2 hours ago

I once use Acode plugin called AcodeX which allow to execute Termux command inside the editor. However you need to install NodeJS package acodex-server to be installed and running as well. But I thought using SSH feature directly within AcodeX without any bridge (except the SSH server itself) would be a better approach.

Let the ssh shell related stuff to be handled by AcodeX itself, As we are not going to reimplement terminal stuffs in Acode .

bajrangCoder commented 2 hours ago

Hmm, currently Acode doesn't indicate symlinks, it just open that folder if it able to. Btw why using SFTP , as using "Add Path"(a.k.a External storage thing) you can access sd card , termux private directory etc and that will be also able to access symlinks