CanOpenFile method (Boolean)
Collapse the table of content
Expand the table of content

SPFile.CanOpenFile method (Boolean)

Indicates whether the current user has permission to view the content of the file, specifying a level of access.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public bool CanOpenFile(
	bool checkCanGetFileSource
)

Parameters

checkCanGetFileSource
Type: System.Boolean

true to verify that the user can view the source for the file; otherwise, false.

Return value

Type: System.Boolean
true if the current user has permission; otherwise, false.
Show:
© 2016 Microsoft