internal static class InternalHelpers : object
AddFileAttrribute(FileAttributes source, FileAttributes attr)
Adds a FileAttributes attr to the existing collection source.
public static FileAttributes AddFileAttrribute(FileAttributes source, FileAttributes attr)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to add
Returns
FileAttributes
ContainsFileAttribute(FileAttributes source, FileAttributes attr)
Checks whether the given attribute in the collection is included.
public static Boolean ContainsFileAttribute(FileAttributes source, FileAttributes attr)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to check
Returns
True if exists, false if not
ForceFileAttributesExistance(FileAttributes source, FileAttributes attr, Boolean existance)
Adds another FileAttributes attr to the existing collection source
public static FileAttributes ForceFileAttributesExistance(FileAttributes source, FileAttributes attr, Boolean existance)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to add or remove
existance
Booleantrue to add, false to remove
Returns
FileAttributes
RemoveFileAttribute(FileAttributes source, FileAttributes attr)
Removes a FileAttributes attr to the existing collection source.
public static FileAttributes RemoveFileAttribute(FileAttributes source, FileAttributes attr)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to remove
Returns
FileAttributes
TryAddFileAttrribute(FileAttributes source, FileAttributes attr, FileAttributes& updatedSource)
Adds a FileAttributes attr to the existing collection source. Returns true on add. False if the collection already contains that attribute.
public static Boolean TryAddFileAttrribute(FileAttributes source, FileAttributes attr, FileAttributes& updatedSource)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to add
updatedSource
FileAttributes&FileAttributes after update
Returns
True if attributes updated
TryForceFileAttributesExistance(FileAttributes source, FileAttributes attr, Boolean existance, FileAttributes& updatedSource)
Checks whether an attribute is already in the collection; If not, it will be added. Returns true on add. False if the collection already contains that attribute.
public static Boolean TryForceFileAttributesExistance(FileAttributes source, FileAttributes attr, Boolean existance, FileAttributes& updatedSource)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to add or remove
existance
Booleantrue to add, false to remove
updatedSource
FileAttributes&FileAttributes after update
Returns
True if the collection source has been updated updatedSource.
TryRemoveFileAttrribute(FileAttributes source, FileAttributes attr, FileAttributes& updatedSource)
Removes a FileAttributes attr to the existing collection source. Returns true on remove. False if the collection does not contain that attribute.
public static Boolean TryRemoveFileAttrribute(FileAttributes source, FileAttributes attr, FileAttributes& updatedSource)
Parameters
source
FileAttributesFileAttributes collection
attr
FileAttributesAttribute to remove
updatedSource
FileAttributes&FileAttributes after update
Returns
True if attributes updated