ShellItemAttributesMask Enumeration

Specifies the ttributes that can be retrieved on an item (file or folder) or set of items.

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum ShellItemAttributesMask

Remarks

Members

None 0  
CanCopy 1 The specified items can be copied.
CanMove 2 The specified items can be moved.
CanLink 4 Shortcuts can be created for the specified items. This attribute has the same value as DROPEFFECT_LINK.

If a namespace extension returns this attribute, a Create Shortcut entry with a default handler is added to the shortcut menu that is displayed during drag-and-drop operations.

The extension can also implement its own handler for the link verb in place of the default. If the extension does so, it is responsible for creating the shortcut.

A Create Shortcut item is also added to the Windows Explorer File menu and to normal shortcut menus.

If the item is selected, your application's IContextMenu.InvokeCommand method is invoked with the lpVerb member of the CMINVOKECOMMANDINFO structure set to link. Your application is responsible for creating the link.

Storage 8 The specified items can be bound to an IStorage object through BindToObject(PIDL, IBindCtx, Guid).
CanRename 16 The specified items can be renamed.

Note that this value is essentially a suggestion; not all namespace clients allow items to be renamed. However, those that do must have this attribute set.

CanDelete 32 The specified items can be deleted.
HasPropertySheet 64 The specified items have property sheets.
DropTarget 256 The specified items are drop targets.
CapabilityMask 375 This flag is a mask for the capability attributes: CanCopy, CanMove, CanLink, CanRename, CanDelete, HasPropertySheet, and DropTarget.

Callers normally do not use this value.

System 4,096 The specified items are system items.
Encrypted 8,192 The specified items are encrypted and might require special presentation.
IsSlow 16,384 Accessing the item (through IStream or other storage interfaces) is expected to be a slow operation.

Applications should avoid accessing items flagged with IsSlow.

Opening a stream for an item is generally a slow operation at all times.

IsSlow indicates that it is expected to be especially slow, for example in the case of slow network connections or offline (FILE_ATTRIBUTE_OFFLINE) files. However, querying IsSlow is itself a slow operation.

Applications should query IsSlow only on a background thread. An alternate method, such as retrieving the PKEY_FileAttributes property and testing for FILE_ATTRIBUTE_OFFLINE, could be used in place of a method call that involves IsSlow.

Ghosted 32,768 The specified items are shown as dimmed and unavailable to the user.
Link 65,536 The specified items are shortcuts.
Share 131,072 The specified objects are shared.
ReadOnly 262,144 The specified items are read-only.

In the case of folders, this means that new items cannot be created in those folders.

This should not be confused with the behavior specified by the FILE_ATTRIBUTE_READONLY flag retrieved by IColumnProvider.GetItemData in a SHCOLUMNDATA structure. FILE_ATTRIBUTE_READONLY has no meaning for Win32 file system folders.

Hidden 524,288 The item is hidden and should not be displayed unless the Show hidden files and folders option is enabled in Folder Settings.
DisplayAttributeMask 1,032,192 Do not use.
NonEnumerated 1,048,576 The items are nonenumerated items and should be hidden.

They are not returned through an enumerator such as that created by the EnumObjects(IntPtr, ShellFolderEnumObjectsFlags) method.

NewContent 2,097,152 The items contain new content, as defined by the particular application.
Stream 4,194,304 Indicates that the item has a stream associated with it.

That stream can be accessed through a call to BindToObject(PIDL, IBindCtx, Guid) or BindToHandler(IBindCtx, Guid, Guid) with IID_IStream in the refIID parameter.

StorageAncestor 8,388,608 Children of this item are accessible through IStream or IStorage.

Those children are flagged with Storage or Stream.

Validate 16,777,216 When specified as input, Validate instructs the folder to validate that the items contained in a folder or Shell item array exist.

If one or more of those items do not exist, GetAttributesOf(UInt32, IntPtr, ShellItemAttributesMask) and IShellItemArray.GetAttributes return a failure code. This flag is never returned as an [out] value.

When used with the file system folder, Validate instructs the folder to discard cached properties retrieved by clients of IShellFolder2.GetDetailsEx that might have accumulated for the specified items.

Removable 33,554,432 The specified items are on removable media or are themselves removable devices.
Compressed 67,108,864 The specified items are compressed.
Browsable 134,217,728 The specified items can be hosted inside a web browser or Windows Explorer frame.
FileSystemAncestor 268,435,456 The specified folders are either file system folders or contain at least one descendant (child, grandchild, or later) that is a file system (FileSystem) folder.
Folder 536,870,912 The specified items are folders.

Some items can be flagged with both Stream and Folder, such as a compressed file with a .zip file name extension.

Some applications might include this flag when testing for items that are both files and containers.

FileSystem 1,073,741,824 The specified folders or files are part of the file system (that is, they are files, directories, or root directories).

The parsed names of the items can be assumed to be valid Win32 file system paths. These paths can be either UNC or drive-letter based.

StorageCapMask 1,891,958,792 This flag is a mask for the storage capability attributes: Storage, Link, ReadOnly, Stream, StorageAncestor, FileSystemAncestor, Folder, and FileSystemAncestor.

Callers normally do not use this value.

HasSubfolder 2,147,483,648 The specified folders have subfolders.

The HasSubfolder attribute is only advisory and might be returned by Shell folder implementations even if they do not contain subfolders. Note, however, that the converse—failing to return HasSubfolder —definitively states that the folder objects do not have subfolders.

Returning HasSubfolder is recommended whenever a significant amount of time is required to determine whether any subfolders exist. For example, the Shell always returns HasSubfolder when a folder is located on a network drive.

ContentsMask 2,147,483,648 This flag is a mask for content attributes, at present only HasSubfolder.

Callers normally do not use this value.

PropertyKeyShellItemAttributesMask 2,164,539,392 Mask used by the PKEY_SFGAO flags property to determine attributes that are considered to cause slow calculations or lack context:

IsSlow, ReadOnly, HasSubfolder, and Validate.

Callers normally do not use this value.

See Also