Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: add disk_usage() #23634

Merged
merged 6 commits into from
Feb 2, 2025
Merged

os: add disk_usage() #23634

merged 6 commits into from
Feb 2, 2025

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented Feb 2, 2025

disk_usage(path) returns disk usage of path
Examples:

pub struct DiskUsage {
pub:
        total     u64
        available u64
        used      u64
}

usage := os.disk_usage('.')!
assert usage.total > 0
assert usage.available > 0
assert usage.used > 0

Copy link

Connected to Huly®: V_0.6-22058

vlib/os/os_nix.c.v Outdated Show resolved Hide resolved
@spytheman spytheman changed the title os:add disk_usage() os: add disk_usage() Feb 2, 2025
Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

vlib/os/os_nix.c.v Outdated Show resolved Hide resolved
vlib/os/os_windows.c.v Outdated Show resolved Hide resolved
spytheman and others added 2 commits February 2, 2025 19:31
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
Co-authored-by: JalonSolov <JalonSolov@gmail.com>
@spytheman spytheman merged commit d78bf11 into vlang:master Feb 2, 2025
71 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants