avogelba / WinDirStats

WinDirStats - Windows Directory Statistics, private clone from:
https://bitbucket.org/windirstat/windirstat
GNU General Public License v2.0
5 stars 0 forks source link

Support Skydrive (Windows 8.1 and perhaps later?) #53

Open avogelba opened 10 years ago

avogelba commented 10 years ago

Originally reported by: Oliver (Bitbucket: assarbad, GitHub: assarbad)


Thanks to Guido who pointed out to me via email:

In Win 8.1 MS integrated Skydrive into the Windows explorer. Along with this comes a new feature which is called 'intelligent files' i.e. a file is shown in Explorer with its full size but actually uses only a few kilobytes because it lives in Skydrive. The difference becomes obvious in the properties dialog of the file. There is a 'size' and a 'size on disk'. Windirstat seems to use the 'size' and not the 'size on disk'. In order to decide which files use the most disk space Windirstat should use 'size on disk' or at least should be configurable to do so.


avogelba commented 8 years ago

Original comment by Douglas Santos (Bitbucket: douglascaetano, GitHub: douglascaetano):


@voltagex I see. But still, I hope this will be solved. I ran across this issue recently on my Win 8. Thanks for the answer.

avogelba commented 8 years ago

Original comment by Adam Baxter (Bitbucket: voltagex, GitHub: voltagex):


@douglascaetano this was an issue with Windows 8/8.1 only related to NTFS Placeholder files. Microsoft removed support for these in Windows 10.

avogelba commented 8 years ago

Original comment by Douglas Santos (Bitbucket: douglascaetano, GitHub: douglascaetano):


Isn't this issue related to issue #68? From what I understand, what WinDirStat must do is simply to read "Size on Disk" property to know the size such file is occupying on disk. Why need WinDirStat to know if the file has anything to do with OneDrive (formerly SkyDrive)?

avogelba commented 9 years ago

Original comment by Luc Maes (Bitbucket: lucPmaes, GitHub: lucPmaes):


What's the outlook on this topic, as with Onedrive being integral part of windows 8.1 it makes WinDirStat a little cumbersome to use if you can't differentiate what's really on the disk and what is only "virtually" there (as I guess that the number one reason for using windirstat is to understand the local disk drive usage.

Thanks for your feedback Luc

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


@voltagex confirmed, getting The file cannot be accessed by the system. with it.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Updated the version of looklink (binaries are code-signed):

$ looklink64.exe --verbose --nologo --noerror filename.jpg
'\\?\C:\Users\Oliver\SkyDrive\filename.jpg' is a Microsoft placeholder file (virt == 0)
        File Index: 1125899906844550 (0004000000000786)
        Tag       : 80000015
        GUID      : {00000000-0000-0000-0000-000000000000}
avogelba commented 10 years ago

Original comment by Adam Baxter (Bitbucket: voltagex, GitHub: voltagex):


Huh, the SysInternals streams utility can't open any file that's marked as "online-only"

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


@voltagex sure. Here you go:

Make offline

Make online-only

avogelba commented 10 years ago

Original comment by Adam Baxter (Bitbucket: voltagex, GitHub: voltagex):


I will double check your results soon but can you share the info on how to mark a file as online only? (programatically?)

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Whoa, got part of it. C:\Users\Username\SkyDrive is the place to look. But dir doesn't yield anything. On the other hand looklink works and I am updating it at this very moment.

avogelba commented 10 years ago

Original comment by ClockworkPirate (Bitbucket: ClockworkPirate, GitHub: Unknown):


As I understand it, the placeholders (and actual files when something is marked as "available offline") are actually stored in the SkyDrive folder, wherever you put it. Your file on the desktop is completely unrelated to the copy that's now on your SkyDrive.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


@voltagex can you tell by any chance where such a placeholder file is stored? Because it appears they're not getting stored in the location from which you add them. Basically what I did was put an image onto the desktop and then add that to SkyDrive. Once successful, I made the file online-only. But now what ... the file on the desktop hasn't changed in the least, it appears.

It's like the SkyDrive has some special storage location. Checking myself now, but it would be good if you could help out.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Found the option to make a file online only

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Adam, yes, they sure must have. Also, there must be a filter driver or driver is some kind that implements the particular reparse tag. But I am still investigating.

The only question is whether there's a way to make a file non-local on-demand instead of having to use two machines and doing things asynchronously on them.

avogelba commented 10 years ago

Original comment by Adam Baxter (Bitbucket: voltagex, GitHub: voltagex):


The WinRT bit is only part of it. They've implemented a "service", c:\windows\system32\skydrive.exe, and then explorer.exe must have support for these files as Windows is able to make a request to SkyDrive when I double click a file that is not yet local.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Okay, so SkyDrive

I just created a Microsoft account for testing purposes and will try to investigate the matter a bit.

avogelba commented 10 years ago

Original comment by Oliver (Bitbucket: assarbad, GitHub: assarbad):


Adam, thanks a bunch. IO_REPARSE_TAG_FILE_PLACEHOLDER is already the piece of missing information I need. They are therefore related to symlinked files, just another type of reparse point. I am going to have a look to see whether my assumptions are right, but I guess that my very own looklink can be extended to support that.

avogelba commented 10 years ago

Original comment by Adam Baxter (Bitbucket: voltagex, GitHub: voltagex):


The official name of this is 'smart files', known in the preview version as 'placeholder files'. I am trying to track down the APIs that are used for this but they appear to all be oriented towards WinRT and C# (System.Storage namespace)

http://msdn.microsoft.com/en-us/library/windows/desktop/dn323738%28v=vs.85%29.aspx is the only reference I can find.

I'm not sure if 'size on disk' is the right way to approach this but it may be the most 'portable' (between Windows versions)

avogelba commented 10 years ago

Original comment by ClockworkPirate (Bitbucket: ClockworkPirate, GitHub: Unknown):


This is a pretty big issue as I store more and more stuff on SkyDrive. On my 32GB Venue 8 Pro, SkyDrive is showing as bigger than the entire capacity of the drive!