Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature idea: delete directory #17

Closed
ThinkTransit opened this issue Jan 13, 2023 · 6 comments
Closed

Feature idea: delete directory #17

ThinkTransit opened this issue Jan 13, 2023 · 6 comments
Labels

Comments

@ThinkTransit
Copy link

It would be really useful to be able to delete just one directory.

Maybe a new command or a parameter could be supplied to "clear" eg. "clear /logs"?

@AmirHmZz
Copy link
Owner

Thanks for the idea, In your opinion it is better to delete files inside of the directory or delete directory too?

@ThinkTransit
Copy link
Author

I think it would be good to mimic the linux rm command, for example

Deletes directory

mpbridge clear dir

Deletes files in directory

mpbridge clear dir/*

I don't know how hard this would be to implement.

@AmirHmZz AmirHmZz added the clear label Jan 14, 2023
@AmirHmZz
Copy link
Owner

It's not hard at all but I'll be glad to hear @Wind-stormger opinion too about this change

@Wind-stormger
Copy link
Contributor

I don't think we can keep reinventing the wheel any longer.

Let me be straightforward, if you must use commands, mpremote connect [RPOT] fs rmdir [remote dir] will do it.

The current method of mpbridge deleting files and folders is much simpler and easier than using commands.

Run mpbridge bridge <PORT>, delete files or folders you don't need, end.

So convenient, because it can be operated in the graphical file management interface of your operating system, this is what makes mpbridge unique, at least in my opinion.

If you can only operate in the terminal, mpremote is your best choice.

Have a nice day.

@Wind-stormger
Copy link
Contributor

In fact, the one who reinvented the wheel was me.

mpbridge list is completely copied from mpremote connect list. #16 (this is more like copying the wheel)

I have been struggling with this for a long time, but I think that listing available devices is the most basic function that a micropython auxiliary development tool should have, even if this function comes from mpremote, and mpbridge is developed based on mpremote.

To continue reinventing, or copying the wheel, I don't think it's appropriate anymore, this is my personal opinion.

@AmirHmZz
Copy link
Owner

@Wind-stormger I've had the exact idea in my head and that was why I've asked your opinion. Some low level functionalities must be implemented in mpremote itself. Deleting a full directory should be nothing further and more than an empty directory. I think it is better to focus on features that mpremote is not going to have in future. So I will close this issue but feel free to open another one if you have other ideas.

@AmirHmZz AmirHmZz closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants