-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53bdd9f
commit 9a929d3
Showing
15 changed files
with
1,910 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27130.2024 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NvidiaCleaner", "NvidiaCleaner\NvidiaCleaner.csproj", "{585F40B9-4B50-4032-9E27-5865DFA40409}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{585F40B9-4B50-4032-9E27-5865DFA40409}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{585F40B9-4B50-4032-9E27-5865DFA40409}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{585F40B9-4B50-4032-9E27-5865DFA40409}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{585F40B9-4B50-4032-9E27-5865DFA40409}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {F01FE2C7-79F0-4DD9-B598-26ADE46D5335} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace NvidiaCleaner.Lib | ||
{ | ||
class NVC | ||
{ | ||
//Calculates the directory size by checking each and every files' size's in directory and sub-directories. | ||
public static long GetDirectorySize(string path) | ||
{ | ||
string[] a = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories); | ||
long b = 0; | ||
foreach (var name in a) | ||
{ | ||
FileInfo info = new FileInfo(name); | ||
b += info.Length; | ||
} | ||
return b; | ||
} | ||
|
||
//Byte to desired significance converter. KB, MB, GB only. | ||
public static double SizeConvert(long b, string desired) | ||
{ | ||
long sizeKB = b / 1024; | ||
int sizeMB = (int)sizeKB / 1024; | ||
double sizeGB = sizeMB / 1024.0; | ||
|
||
switch (desired) | ||
{ | ||
case "KB": | ||
return sizeKB; | ||
case "MB": | ||
return sizeMB; | ||
case "GB": | ||
return sizeGB; | ||
default: | ||
return 0.0; | ||
} | ||
} | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.