File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Source/Code.Library/Code.Library Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 42
42
</ItemGroup >
43
43
<ItemGroup >
44
44
<Compile Include =" ExceptionHelper.cs" />
45
+ <Compile Include =" FileHelper.cs" />
45
46
<Compile Include =" ImageHelper.cs" />
46
47
<Compile Include =" Properties\AssemblyInfo.cs" />
47
48
<Compile Include =" StringHelper.cs" />
Original file line number Diff line number Diff line change
1
+ using System . IO ;
2
+
3
+ namespace Code . Library
4
+ {
5
+ public static class FileHelper
6
+ {
7
+ /// <summary>
8
+ /// Delete file
9
+ /// Author : Abhith
10
+ /// Date : 14 July 2015
11
+ /// Reference : Sysberries
12
+ /// </summary>
13
+ /// <param name="fileName"></param>
14
+ public static void DeleteFile ( string fileName )
15
+ {
16
+ if ( string . IsNullOrEmpty ( fileName ) )
17
+ {
18
+ return ;
19
+ }
20
+
21
+ if ( File . Exists ( fileName ) )
22
+ {
23
+ File . Delete ( fileName ) ;
24
+ }
25
+ }
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments