2012-03-12 : 초안 작성
2017-12-30 : 소스 코드 수정 및 추가
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.IO; | |
namespace createdir | |
{ | |
private DirectoryInfo dir; | |
private StreamWriter sr; | |
/* | |
* @brief : create file path | |
* @path : filepath | |
*/ | |
private void create(string path) | |
{ | |
dir = Directory.CreateDirectory(path); | |
if (Directory.Exists(month)) { | |
// thread-safe | |
lock (this) | |
{ | |
this.sr = new StreamWriter(path + ".log", true); | |
this.sr.Write(System.DateTime.Now.ToString("HH:mm:ss")); | |
this.sr.Flush(); | |
} | |
} | |
} | |
} |
ASP.NET - ADO.NET + ASP.NET DB 연동 간단한 예제 (0) | 2018.01.02 |
---|---|
C# - 들여쓰기 (0) | 2017.12.31 |
C# - error CS0227: Unsafe code (0) | 2017.12.30 |
C# - 크로스 스레드 작업이 잘못 되었습니다. (0) | 2017.12.30 |
C# - 읽기 전용 디렉토리 삭제하기 (0) | 2017.12.30 |
댓글 영역