Author Topic: Refresh file info in a directory  (Read 81 times)

nietrupek

  • Newbie
  • *
  • Posts: 9
    • View Profile
Refresh file info in a directory
« on: May 02, 2021, 12:44:12 »
Windows 10, local filesystem (C: drive).

When I download large file using browser, a temporary file (largefile.mp4.part) is created. MC shows this file with size of approx. 32kB. The file is growing, but its size is still shown as 32kB. Pressing F2 (or Refresh icon) does nothing. Also DIR command shows file size as 32kB.

But when I do one of the following:
- select file and press F3 (View file)
- use Cygwin's 'ls -l' command
proper file size is immediately shown in MC. DIR command also returns refreshed file size info.

Apparently MC's F3 command (and Cygwin's ls) do something that forces Windows to "wake up" and report proper file info to the caller.

Here's my feature request: change F2/Refresh to deal properly with situation described above.


Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 3777
    • View Profile
    • Multi Commander
Re: Refresh file info in a directory
« Reply #1 on: May 03, 2021, 11:30:07 »
This is now NTFS work. It is a optimization in the filesystem.. But if a forced open of the file is done before the file is completed Windows will then flush the data it has so far. However this can slow down the writing of data or make it split it into more segment making it more fragmented.

Auto force opening all files on refresh would be slow. The whole refresh process would be slower and it will also destroy the reason why NTFS is doing this. There is reason why Windows does this.