FileInfo
public record FileInfo(String path, boolean isDirectory, long size, String modifiedAt)
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:27–46承载文件信息数据的记录类型。位于 io.agentscope.harness.agent.filesystem.model 包。核心成员包括 path、isDirectory、size、modifiedAt、ofFile、ofDir。
Structured file listing info. Only path is required;
other fields are best-effort and may be absent depending on filesystem implementation.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
path | String | 执行路径相关操作。 absolute or relative file path |
isDirectory | boolean | 判断是否条目是目录。 whether the entry is a directory |
size | long | 执行大小相关操作。 file size in bytes (approximate) |
modifiedAt | String | 执行 `modifiedAt` 方法。 ISO 8601 timestamp of last modification, or empty string if unknown |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static FileInfo ofFile(String path, long size, String modifiedAt)static | 执行的文件相关操作。 Performs the of file operation. |
public static FileInfo ofDir(String path, String modifiedAt)static | 执行的目录相关操作。 Performs the of dir operation. |
public static FileInfo ofFile(String path, long size, long lastModifiedMs)static | 执行的文件相关操作。 Performs the of file operation. |
public static FileInfo ofDir(String path, long lastModifiedMs)static | 执行的目录相关操作。 Performs the of dir operation. |
记录组件详情Record Component Detail
path
String path执行路径相关操作。
absolute or relative file path
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:27–46isDirectory
boolean isDirectory判断是否条目是目录。
whether the entry is a directory
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:27–46size
long size执行大小相关操作。
file size in bytes (approximate)
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:27–46modifiedAt
String modifiedAt执行 modifiedAt 方法。
ISO 8601 timestamp of last modification, or empty string if unknown
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:27–46方法详情Method Detail
ofFile
public static FileInfo ofFile(String path, long size, String modifiedAt)
static
执行的文件相关操作。
Performs the of file operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
size | long | 大小(类型 `long`)。The size. |
modifiedAt | String | modified At(类型 `String`)。The modified at. |
FileInfo返回FileInfo。Returns file info.
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:29–31ofDir
public static FileInfo ofDir(String path, String modifiedAt)
static
执行的目录相关操作。
Performs the of dir operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
modifiedAt | String | modified At(类型 `String`)。The modified at. |
FileInfo返回FileInfo。Returns file info.
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:33–35ofFile
public static FileInfo ofFile(String path, long size, long lastModifiedMs)
static
执行的文件相关操作。
Performs the of file operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
size | long | 大小(类型 `long`)。The size. |
lastModifiedMs | long | 最后 Modified Ms(类型 `long`)。The last modified ms. |
FileInfo返回FileInfo。Returns file info.
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:37–40ofDir
public static FileInfo ofDir(String path, long lastModifiedMs)
static
执行的目录相关操作。
Performs the of dir operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
path | String | 路径(类型 `String`)。The path. |
lastModifiedMs | long | 最后 Modified Ms(类型 `long`)。The last modified ms. |
FileInfo返回FileInfo。Returns file info.
源码Source
io/agentscope/harness/agent/filesystem/model/FileInfo.java:42–45