일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- nullable
- string
- Process
- Coding
- programmers
- algorithm
- WPF
- 코딩테스트
- commit
- chashtag
- dotNET
- log
- Binding
- Github
- convert
- ListView
- csharp
- C#
- tls
- coding-test
- Microsoft
- IValueConverter
- .net
- windows10
- git
- logging
- File
- Visual Studio
- mysql
- windows
Archives
- Today
- Total
목록Directory (2)
CHashtag
[C#] 폴더 크기 구하기 (Get Directory Size)
폴더 내부의 모든 파일의 크기를 구하는 함수입니다. 단위는 byte입니다. public long GetDirectorySize(string path) { long size = 0; DirectoryInfo dirInfo = new DirectoryInfo(path); foreach (FileInfo fi in dirInfo.GetFiles("*", SearchOption.AllDirectories)) { size += fi.Length; } return size; }
C#
2021. 7. 1. 17:30
[C#] 압축, 압축 풀기 (zip, unzip)
오늘은 폴더를 zip 파일로, zip 파일을 폴더로 만드는 방법에 대해 알아보겠습니다. 아래 코드를 구현하기 위해선 System.IO.Compression.FileSystem을 Reference에 추가하여야 합니다. static void Main(string[] args) { string directoryPath = @"D:\Record"; string zipPath = @"D:\Record.zip"; string unzipPath = @"D:\UnzipRecord"; bool zipResult = ZipDirectory(directoryPath, zipPath); bool unzipResult = UnzipFile(zipPath, unzipPath); } public static bool ZipDire..
C#
2021. 2. 5. 00:35