Can i watch folders/files for changes with D language?

Russel Winder russel at winder.org.uk
Wed Oct 10 07:18:18 UTC 2018


On Tue, 2018-10-09 at 17:20 +0000, Ephrahim via Digitalmars-d-learn
wrote:
> Hi Everyone, i'm planning on developing a software for 
> synchronizing folder contents across multiple computers. The 
> software will evolve very quickly into virtual Remote Desktop 
> Access system.
> So i've been considering C++ for this, its the best in the market 
> of all things fast at the moment (Considering the availability of 
> tools and docs). But i hate just two things in the language, 
> (.cpp + .h files) and no "easy" centralized package manager.
> So i'm definitely considering D and Python now, but D seems to 
> satisfy my needs as per this software. I've developed very good 
> custom server for hardware before, and it performed very well.
> So i need your help guys, can you point me to any documentation 
> or libraries i can use to watch files/folders for changes 
> (delete, edit, new content)?

Conan is the up and coming centralised package management system for
C++.

C++ may, or may not, get modules (and so remove the .cpp/.h split)
sometime before the heat death of the universe.

You should add Rust to the list of options I believe.

Not sure whether Go should be added as well, probably Yes.

Python, D, Rust, and Go, all have bindings the the various file
watching facilities in the various operating systems.
 
> I intend to make this a command line tool for a start, but i'll 
> need a GUI sooner or later. So i also need help pointing me to 
> the best available GUI library D has.

It is really a question of which GUI framework you want to use. This is
a situation where a bit of forward planning will help avoid having to
reimplement or hack in silly ways.

The two obvious candidates are Qt and GTK if you want to be cross-
platform. This then leads to the question which programming languages
have good bindings to the frameworks. I am more or less in the GTK camp
now having more or less given up on Qt, however Qt remains a very good
choice.

D, Python, and Rust have excellent bindings to GTK. Go has a good
binding. C++ binding to GTK is not bad, but I prefer the D and Rust
ones.

Python has an excellent binding to Qt (use PySide2). Obviously C++ has
an excellent binding to Qt since Qt is a C++ library. I have not
properly investigated D and Rust bindings to Qt. The Big Question™ is
whether to use QML or not. I get the feeling the answer is yes you
probably should. The Python and Go binding for using QML are good, I
haven't tried D, Rust, or C++.

[…]

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20181010/8d504772/attachment-0001.sig>


More information about the Digitalmars-d-learn mailing list