Xceed .NET Libraries Documentation
ReparsePointTagsFilter Class
Members 


Xceed.FileSystem Assembly > Xceed.FileSystem Namespace : ReparsePointTagsFilter Class

Filters a FileSystemItem object based on its ReparsePointTags value.

Syntax
'Declaration
 
Public Class ReparsePointTagsFilter 

   Inherits Filter
'Usage
 
Dim instance As ReparsePointTagsFilter
public class ReparsePointTagsFilter : Filter 
Remarks

By default, the FilterScope is set to File, Folder and Recurse.

The filter works by obtaining the reparse point tags for the supplied item.

Then, it performs a bitwise-and operation between the tags and the value of the Mask Property.

The resulting value is then compared with the value of the ExpectedResult Property. If the values are equal, the filter matches, otherwise, the filter doesn't match.

The default values of the filter make it so that all name surrogates (symbolic links, hard links, junctions, etc) are filtered out.

The default mask being ReparseTagNameSurrogate makes the filter isolate the name surrogate bits in the tag value. Then, the expected value of 0 makes the result be true for all items that don't have any name surrogate bits set, and the result be false for all items that do have name surrogate bits set.

Example
AbstractFile zipFile = new DiskFile( "ReparsePointTagsFilterExample.zip" );



if( zipFile.Exists )

  zipFile.Delete();



ZipArchive zip = new ZipArchive( zipFile );



/* Notice how we use WindowsDiskFolder here. WindowsDiskFile/WindowsDiskFolder classes

are able to obtain the reparse point tag values from Windows. Unlike DiskFile/DiskFolder. */

      

// Select a source folder

AbstractFolder sourceFolder = new WindowsDiskFolder( @"C:\Users" );



/* The default behavior of the ReparsePointTagsFilter is to exclude reparse

point name surrogate files and folders when recursing into subfolders */



// Create a reparse point filter

Filter filters = new ReparsePointTagsFilter();



/* Using the filter when zipping will exclude name surrogate files and folders */



// Apply the reparse point filter when zipping

sourceFolder.CopyFilesTo( zip, true, true, filters );
      Dim zipFile As AbstractFile = New DiskFile("ReparsePointTagsFilterExample.zip")



      If zipFile.Exists Then

        zipFile.Delete()

      End If



      Dim zip As New ZipArchive(zipFile)



'       Notice how we use WindowsDiskFolder here. WindowsDiskFile/WindowsDiskFolder classes

'      are able to obtain the reparse point tag values from Windows. Unlike DiskFile/DiskFolder. 



      ' Select a source folder

      Dim sourceFolder As AbstractFolder = New WindowsDiskFolder("C:\Users")



'       The default behavior of the ReparsePointTagsFilter is to exclude reparse

'      point name surrogate files and folders when recursing into subfolders 



      ' Create a reparse point filter

      Dim filters As Filter = New ReparsePointTagsFilter()



      ' Using the filter when zipping will exclude name surrogate files and folders 



      ' Apply the reparse point filter when zipping

      sourceFolder.CopyFilesTo(zip, True, True, filters)
Inheritance Hierarchy

System.Object
   Xceed.FileSystem.Filter
      Xceed.FileSystem.ReparsePointTagsFilter

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReparsePointTagsFilter Members
Xceed.FileSystem Namespace

Backgroud and tips

ReparsePointTagsFilter class