1

I have noticed that when files are open by certain applications the safe removal of their source usb drive is not prevented (in contrast with other programs that will block the safe removal while the file is still open). Example:

  1. Plug a usb flash drive
  2. Open a text document with standard Windows Notepad
  3. Try to safely remove the drive

This will fail to eject the drive from the system.

  1. Now close that text document
  2. Reopen it with Notepad++
  3. Try to safely remove the drive

Usb drive is successfully removed.

Why does that happen?

1 Answer 1

0

That depends on how the programmer implemented the "open file procedure" in the software.

Without going into an exact explanation on how the file handling is realized try to imagine it as a "connection" between file and application. As long as the connection is open you can not remove the drive. That would be you're MS Notepad example.

Your Notepad++ example works different: To read the content of a file the Notepad++ builds up the connection to the file. But after it "got" everything closes the connection but still keep the content of the file visible in it's window. This way although it seems like the file is "open" the "connection" was closed and you can remove your drive.

Hope that helps...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.