It is a little more than that as you also need to write alternating state to the file, but you are right, and that is the point of the post. You can read/write embedded sensors/actuators in whatever language you are comfortable by simply reading/writing from the Linux file system.
.. on a correctly set up beaglebone, not other systems. It would be much better if this were in the title.
On most embedded systems and FPGAs faffing with the toolchain and hunting in the documentation is 99% of the effort of getting an LED blinking, that's why it's used as the embedded 'hello world'.