The page has unconfirmed changes. Use the buttons below to see older versions.
Why is python used for API calls?
Getting meta data of a file (or any other filesystem-entry)
The meta data (modification date, size and id) of a file (or any other filesystem-entry) is stored in the parent folder, (at least in the filesystems I've tested (ext4, ntfs)). This means that a programming language (or API) that can exploit this, can acquire the necessary meta data much faster (like 10 times faster) than an API that must make a OS-request for each file.
Particularly python and C++ can do this (while node.js can't)
The file timestamp resolution also differs between different APIs
node.js "fs"-library: 3 decimals
python: 9 decimals
- As for using other "APIs" one can note that when using:
scp: 0 decimals are kept on the copy.
See also: Timestamp precision of filesystems
Summary
Using python instead of node.js to parse the filesystem-trees makes it much faster, and gives you much better timestamp resolution.