@@ -34,7 +34,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
3434 CancellationToken cancellationToken = default )
3535 {
3636 var paths = new List < string > ( ) ;
37-
37+
3838 Console . WriteLine ( $ "Searching for files in \" { directory } \" containing \" { content } \" ...") ;
3939
4040 foreach ( var path in Directory . EnumerateFiles ( directory , "*.*" , SearchOption . AllDirectories ) )
@@ -46,7 +46,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
4646 {
4747 continue ;
4848 }
49-
49+
5050 //FileInfo info = new FileInfo(path);
5151 var text = await File . ReadAllTextAsync ( path , cancellationToken ) . ConfigureAwait ( false ) ;
5252
@@ -62,7 +62,7 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
6262 // ignore
6363 }
6464 }
65-
65+
6666 Console . WriteLine ( $ "Found { paths . Count } files:") ;
6767 foreach ( var path in paths )
6868 {
@@ -71,16 +71,16 @@ public async Task<IList<string>> FindFilePathsByContentAsync(
7171
7272 return paths ;
7373 }
74-
74+
7575 public async Task < string > ReadContentAsync (
7676 string path ,
7777 CancellationToken cancellationToken = default )
7878 {
7979 Console . WriteLine ( $ "Reading file at path: { path } ") ;
80-
80+
8181 return await File . ReadAllTextAsync ( path , cancellationToken ) . ConfigureAwait ( false ) ;
8282 }
83-
83+
8484 public async Task < string > WriteContentAsync (
8585 string path ,
8686 string newContent ,
@@ -101,11 +101,11 @@ public async Task<string> WriteContentAsync(
101101 break ;
102102 }
103103 }
104-
104+
105105 await File . WriteAllTextAsync ( path , newContent , cancellationToken ) . ConfigureAwait ( false ) ;
106-
106+
107107 Console . WriteLine ( "File written." ) ;
108-
108+
109109 return "File written." ;
110110 }
111111}
0 commit comments