Bracket.Hosting.ZipArchiveDirectory.IsAbsolutePath C# (CSharp) Méthode

IsAbsolutePath() public méthode

public IsAbsolutePath ( string path ) : bool
path string
Résultat bool
        public bool IsAbsolutePath(string path)
        {
            path = VirtualFileUtils.NormalizePath(path);
            return path.StartsWith(_storagePath, StringComparison.CurrentCultureIgnoreCase);
        }

Usage Example

 public void IsAbsolutePathShouldNotMatchOtherZipArchives()
 {
     //given
     var dir = new ZipArchiveDirectory("Fresh.zip");
     //when
     bool isAbsolute = dir.IsAbsolutePath("Fresher.zip/tada");
     //then
     Assert.IsFalse(isAbsolute);
 }
All Usage Examples Of Bracket.Hosting.ZipArchiveDirectory::IsAbsolutePath