Comments (3)
I've been toying with the idea of displaying progress bars (with \r) while the files are being copied or moved. Not sure if this is necessary, but it would be nice to have.
OK maybe not a progress bar, just a progress percentage like this :
$ ctrl -V
Copying /home/ctrl/foo to /tmp/foo [50% | 175 KB / 350 KB]
Then when it finishes, it displays [100% | file size / file size] and moves on to the next file :
Copying /home/ctrl/foo to /tmp/foo [100% | 350 KB / 350 KB]
Copying /home/ctrl/bar to /tmp/bar [...]
This could be a decent compromise between a full blown progress bar and a binary DONE/NOT DONE progress report.
Writing tests for this should be interesting
I'm also not sure how well it's gonna work on Windows
from ctrl.
I did some digging and realized that in order for there to be a progress bar, the copy
and move
functions of the filesystem module should support this feature. Right now though they're only thin wrappers around std.file.copy and std.file.move respectively, which don't report progress. This leaves me with two choices :
- Call
copy
in the background, then somehow track the progress in the foreground - Write my own version of
copy
andmove
that report progress, usingstd.stdio.File
under the hood
from ctrl.
Implemented a basic status reporting of OK/Failed, I'll close this issue for now until I can work on the real-time progress functionality.
from ctrl.
Related Issues (18)
- Tests should be improved HOT 3
- Copying a file that doesn't exist
- Clipboard file can not be created
- Add option to copy multiple files in one call
- Dub-ify the project
- Rethink the executable names HOT 2
- Add a license to the project
- Binary files HOT 1
- Add "cut" support HOT 2
- Set up releases HOT 1
- Measure test coverage HOT 1
- Update build status badge
- The test coverage is suspiciously high
- ctrl doesn't support folders
- The sqlite package seems to be obsolete
- Permissions aren't preserved after copying a file
- ctrl -X doesn't work across drives HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ctrl.