Update README.md

This commit is contained in:
jxxghp
2025-05-01 22:05:16 +08:00
committed by GitHub
parent d4bf8b3642
commit ea1b8ae9ab

View File

@@ -658,7 +658,7 @@ class StorageOperSelectionEventData(ChainEventData):
# 输出参数
storage_oper: Optional[Callable] = Field(default=None, description="存储操作对象")
```
- 3. 在插件的存储操作类中实现以下对应的文件操作具体可参考app/modules/filemanager/storages/__init__.py不支持的可跳过
- 3. 在插件的存储操作类中实现以下对应的文件操作具体可参考app/modules/filemanager/storages/\__init__.py不支持的可跳过
```python
def list(self, fileitem: schemas.FileItem) -> List[schemas.FileItem]:
"""
@@ -813,6 +813,12 @@ def rename_file(self, fileitem: schemas.FileItem, name: str) -> Optional[bool]:
"""
pass
def get_item(self, fileitem: schemas.FileItem) -> Optional[schemas.FileItem]:
"""
查询目录或文件
"""
return self.get_file_item(storage=fileitem.storage, path=Path(fileitem.path))
def get_file_item(self, storage: str, path: Path) -> Optional[schemas.FileItem]:
"""
根据路径获取文件项