On Fri, Jun 24, 2011 at 6:43 PM, Tarun Joshi <[email protected]> wrote: >> The only thing that has happened >> is that the Flash player has become smarter, and probably just deletes >> the .flv file after opening it, so that it is no longer visible, but >> still exists. > > Thanks for sharing that Gora. I have some questions regarding that. > > First, can you tell me how flash player keeps the reference to the > deleted file and buffers all the data in that deleted file. > And second, if I want to imitate what the flash player does(buffering > data into deleted file), can you give me some pointer to a sample > code. [...]
No special work needed. In UNIX operating systems, a file is not removed from the filesystem as long as a process has it open. The file is only actually deleted when the last process holding an open descriptor to it closes the descriptor. So, if I remember correctly, one opens the file, unlinks it (effectively making it invisible to a 'ls'), and can then merrily read/write from/to the open file descriptor as long as the process is running. Of course, the data that you have written will be lost when you close the file descriptor, unless you copy it elsewhere. Regards, Gora _______________________________________________ Ilugd mailing list [email protected] http://frodo.hserus.net/mailman/listinfo/ilugd
