microsoft / microsoft/p4vfs

Query Size on disk

Open
#43 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
308
Forks
20
Avg merge
14h 56m
Merged PRs (30d)
1

Description

Hello,
first, thank you for sharing and maintaining p4vfs, it's very cool.

I'd like to ask if there's a way to programmatically query the Size on disk that I can see in the folder properties window. I'd like to know how much space a given p4vfs-managed directory takes on a disk.

I've tried various approaches, but without success. Mentioning some below:

  • CMD's dir command reports only the full size
  • Git BASH's du command reports the full size and hydrates files in the process
  • Sysinternals' du command reports both Size and Size on disk, but the latter is incorrect (there's a non-zero value)
  • Python's os.stat(file_path).st_size returns the full size

Best,
Juraj

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files, tests, or entry points. Start by locating the p4vfs filesystem and Windows file-size handling, then compare the requested value with the Windows folder-properties “Size on disk” behavior and the approaches listed in the report. Done means documenting or exposing a reliable way to query that value without hydrating files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.