@@ -16,23 +16,33 @@ class UiActionFileInfo(BaseModel):
16
16
"""File Information Nextcloud sends to the External Application."""
17
17
18
18
fileId : int
19
+ """FileID without Nextcloud instance ID"""
19
20
name : str
21
+ """Name of the file/directory"""
20
22
directory : str
23
+ """Directory relative to the user's home directory"""
21
24
etag : str
22
25
mime : str
23
26
fileType : str
27
+ """**file** or **dir**"""
24
28
size : int
29
+ """size of file/directory"""
25
30
favorite : str
31
+ """**true** or **false**"""
26
32
permissions : int
33
+ """Combination of :py:class:`~nc_py_api.files.FilePermissions` values"""
27
34
mtime : int
35
+ """Last modified time"""
28
36
userId : str
37
+ """The ID of the user performing the action."""
29
38
shared : str
39
+ """**true** or **false**"""
30
40
31
41
def to_fs_node (self ) -> FsNode :
32
42
"""Returns created ``FsNode`` from the file info given.
33
43
34
- .. note:: :py:class: FsNode.file_id in this case is ``without`` **instance_id**
35
- and equal to :py:class:FsNode.info. fileid.
44
+ .. note:: :py:attr:`~nc_py_api.files. FsNode.file_id` in this case is ``without`` **instance_id**
45
+ and equal to :py:attr:`~nc_py_api.files.FsNodeInfo. fileid` .
36
46
"""
37
47
user_path = os .path .join (self .directory , self .name ).rstrip ("/" )
38
48
is_dir = bool (self .fileType .lower () == "dir" )
@@ -68,12 +78,15 @@ class UiFileActionHandlerInfo(BaseModel):
68
78
"""Action information Nextcloud sends to the External Application."""
69
79
70
80
actionName : str
81
+ """Name of the action, useful when App registers multiple actions for one handler."""
71
82
actionHandler : str
83
+ """Callback url, which was called with this information."""
72
84
actionFile : UiActionFileInfo
85
+ """Information about the file on which the action run."""
73
86
74
87
75
88
class _UiFilesActionsAPI :
76
- """API for the drop-down menu in Nextcloud `` Files`` app."""
89
+ """API for the drop-down menu in Nextcloud ** Files app** ."""
77
90
78
91
def __init__ (self , session : NcSessionApp ):
79
92
self ._session = session
0 commit comments