PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest¶
- class QWebEngineFileSystemAccessRequest¶
The
QWebEngineFileSystemAccessRequest
class enables accepting or rejecting requests for local file system access from JavaScript applications.Details
To allow web applications to access local files of the computer, applications must connect to
fileSystemAccessRequested
, which takes aQWebEngineFileSystemAccessRequest
instance as an argument.If a web applications requests access to local files or directories,
fileSystemAccessRequested
will be emitted with anQWebEngineFileSystemAccessRequest
instance as an argument whereaccessFlags()
indicates the type of the requested access: read, write or both. The signal handler needs to then either callaccept()
orreject()
.Synopsis¶
Properties¶
accessFlagsᅟ
- Contains the requested file access rightsfilePathᅟ
- Returns the file path this file system access request is referring tohandleTypeᅟ
- Returns the type of the requested file system entry. (File or directory)originᅟ
- URL of the web page that issued the file system access request
Methods¶
def
__init__()
def
accept()
def
accessFlags()
def
filePath()
def
handleType()
def
__ne__()
def
__eq__()
def
origin()
def
reject()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class HandleType¶
This enum describes the type of the requested file system entry.
Constant
Description
QWebEngineFileSystemAccessRequest.HandleType.File
QWebEngineFileSystemAccessRequest.HandleType.Directory
- class AccessFlag¶
(inherits
enum.Flag
) This enum describes the type of the requested access: read, write or both. The options can be OR-ed together from the following list:Constant
Description
QWebEngineFileSystemAccessRequest.AccessFlag.Read
QWebEngineFileSystemAccessRequest.AccessFlag.Write
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property accessFlagsᅟ: Combination of QOpenGLBuffer.RangeAccessFlag¶
This property Contains the requested file access rights..
- Access functions:
This property holds Returns the file path this file system access request is referring to..
- Access functions:
- property handleTypeᅟ: QWebEngineFileSystemAccessRequest.HandleType¶
This property holds Returns the type of the requested file system entry. (File or directory).
- Access functions:
This property holds The URL of the web page that issued the file system access request..
- Access functions:
- __init__()¶
- __init__(other)
- Parameters:
- accept()¶
Accepts the request to access local files.
- accessFlags()¶
- Return type:
Combination of
AccessFlag
Getter of property
filePathᅟ
.- handleType()¶
- Return type:
Getter of property
handleTypeᅟ
.- __ne__(rhs)¶
- Parameters:
- Return type:
bool
Returns
true
iflhs
andrhs
point to different requests.- __eq__(rhs)¶
- Parameters:
- Return type:
bool
Returns
true
iflhs
andrhs
both point to the same request.Getter of property
originᅟ
.- reject()¶
Rejects a request to access local files.