yeah OK ...
redshell being a command-line tool, the only way to integrate it with an AS3 app
is with AIR on the desktop using NativeProcess
right there the wording of the question is quite bad, as you can build AS3 apps with redshell too
so, let's clarify, using Flash you can build AS3 GUI app running in the browser
using Adobe AIR you can build AS3 GUI app running on the desktop and/or mobile,
using redshell you can build AS3 CLI app running on the desktop or the server.
please no, as the maintainer of redshell I would rather have all questions/discussions public
because I do not have time to repeat the same answers for each individuals
it seems you're overcomplicating the problem, but here what I can say
- if it is an archiving/backup problem eg. "I don't want to lose those files"
- favour a centralised solution
- remove the "remote windows volume"
- ignore file duplication problem because hardware is cheaper to store duplicate
- reuse known hardware/software setup for consistency
simply put use a NAS, either well established solutions like Synology/Qnap or custom build
and use something like OpenMediaVault that will do the software part for you and some plugins check omv-extras.
Check blgo posts like My perfect 2018 media server. Openmediavault: NAS/storage + multimedia services, plenty of guides, videos etc.
In the category of backup/archiving/NAS different people have a lot of different needs, but here with a solution based on OMV you'll find plugins to do stuff like sync to cloud (AWS, etc.) or "find duplicate files" even.
It would be quite the same with Synology/Qnap, you'll find "application portal" to customise what you can do with the NAS.
- if it is solely a file duplication problem, eg. "I absolutely want to control what is duplicated or not"
I get the idea of wanting to do things yourself, but when the problem is a very common problem that exists for a long time, you really have to weight the "reuse stuff" vs "reinvent the wheel myself".
At the very worst, if for some reason you absolutely want to build it yourself, port an already existing solution to your own environment, eg, port the Python source code of dupeGuru to AS3.
- if the problem is let's take any non-trivial computer task and implement it so we can learn from it, learn algorithm etc.
- be ready to spend the time, study other languages, etc.
- for ex from a quick search
- find already existing tools, libraries, etc. to study how they do it, their algorithm etc,
With AS3 in general you will have to be able
that "identical file" can be defined differently
some people will consider identical: same name and same size
other people will consider identical: same size
Now for AS3, the difference between Adobe AIR and redshell would be related to the API that can allow you to access the filesystem.
With AIR you get
flash.filesystem.File which inherits
so you can access
With redshell, you can reuse
shell.FileSystem, but you can also directly use C functions in
C.stdio and C functions will allow you do do stuff that AIR may not do by default, like
stat() a file without
read(), which should be faster to get the file informations
and in fact, you can look at the implementation
which reuse C functions like
to build your own "more optimised for what you need" implementation
you will be also able to find numerous hash functions here
that you can either reuse with Adobe AIR or redshell
You will find that there many different ways to approach the problem, for ex: favour the C function
stat() for its speed to avoid to read the file itself, use hash table to store all files informations: name, size, directory or file, etc. and only at the end use a hash function, recurse, till at the end you get a group of "duplicated files", etc.
You can prototype using redshell on the CLI, and then either port it to Adobe AIR for a GUI, or reuse nativeProcess to reuse redshell from AIR, or keep doing it on the CLI, etc.
Or port the C functions you need to an ANE, so you can reuse this kind of native access in AIR
Again, there are many ways to do it.
We don't know the details of how Adobe implemented
we have the API, we can compare similar functions for speed for ex, but that's about it
Even if Redtamarin were to provide an implementation of
we would try to match the API, but we could not match exactly 100% the native implementation
(as we don't have access to it)
but who cares? that's where I would say you are overcomplicating things
if your worry is speed, then test/compare the speed
depends, in general I would say C functions would trump anything else in term of speed,
but then badly implemented it could also not bring the speed result expected
or it could be a case where as long as you are in the ANE context it is fast
but as soon as you transfer the data to AIR the serialisation of the data can slow down things
but again if you want to really know you have to demonstrate that yourself
as it seems nobody either did that kind of comparisons
measure it, compare it, and then interpret the results
For example, when I implemented hashlib, at first I did not want to implement it I would have preferred to reuse an already existing library like
mx.utils.HashUtil, but comparing to original C implementations, it revealed that HashUtil had faulty implementation and I could not have that.
Because of your very specific need and scope, I'm afraid you gonna have to do those comparison yourself.
it is always the problem of what is "good enough" for your need.