CleanName() 공개 정적인 메소드

Cleans a name making it conform to Zip file conventions. Devices names ('c:\') and UNC share names ('\\server\share') are removed and forward slashes ('\') are converted to back slashes ('/'). Names are made relative by trimming leading slashes which is compatible with the ZIP naming convention.
The Zip name transform class is more flexible.
public static CleanName ( string name ) : string
name string The name to clean
리턴 string
예제 #1
0
 internal ZipEntry(string name, int versionRequiredToExtract, int madeByInfo, CompressionMethod method)
 {
     this.externalFileAttributes = -1;
     this.method       = CompressionMethod.Deflated;
     this.zipFileIndex = -1L;
     base..ctor();
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     if (name.Length > 65535)
     {
         throw new ArgumentException("Name is too long", "name");
     }
     if (versionRequiredToExtract != 0 && versionRequiredToExtract < 10)
     {
         throw new ArgumentOutOfRangeException("versionRequiredToExtract");
     }
     this.DateTime         = DateTime.Now;
     this.name             = ZipEntry.CleanName(name);
     this.versionMadeBy    = (ushort)madeByInfo;
     this.versionToExtract = (ushort)versionRequiredToExtract;
     this.method           = method;
 }