BGC Tools
Static Public Member Functions
BGC.IO.FilePath Class Reference

Static Public Member Functions

static void ReplaceInvalidCharacters (ref string path, string replacementValue="")
 Replace all invalid characters for a file with an empty value unless you specificy otherwise More...
 

Detailed Description

Definition at line 5 of file FilePath.cs.

Member Function Documentation

◆ ReplaceInvalidCharacters()

static void BGC.IO.FilePath.ReplaceInvalidCharacters ( ref string  path,
string  replacementValue = "" 
)
inlinestatic

Replace all invalid characters for a file with an empty value unless you specificy otherwise

Parameters
path
replacementValue

Definition at line 13 of file FilePath.cs.

14  {
15  char[] invalidCharacters = System.IO.Path.GetInvalidFileNameChars();
16 
17  for (int i = 0; i < invalidCharacters.Length; ++i)
18  {
19  path = path.Replace(invalidCharacters[i].ToString(), replacementValue);
20  }
21  }

The documentation for this class was generated from the following file: