Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function CanOpenFile ( _
checkCanGetFileSource As Boolean _
) As Boolean
'Usage
Dim instance As SPFile
Dim checkCanGetFileSource As Boolean
Dim returnValue As Boolean
returnValue = instance.CanOpenFile(checkCanGetFileSource)
public bool CanOpenFile(
bool checkCanGetFileSource
)
Parameters
checkCanGetFileSource
Type: System.Booleantrue 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.