AbsoluteFileFolder

绝对文件或目录标识. 精确表示一个远程文件. 不会受同名文件或目录的影响.

Since

2.8

See also

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun delete(): Boolean

删除远程文件或目录. 只会根据 id 精确地删除一个文件或目录, 不会删除其他同名文件或目录. 成功时返回 true, 当远程文件或目录不存在时返回 false.

Link copied to clipboard
abstract suspend fun exists(): Boolean

查询该远程文件或目录是否还存在于服务器.

Link copied to clipboard
abstract suspend fun refresh(): Boolean

更新当前 AbsoluteFileFolder 对象的文件或目录信息 (lastModifiedTime, absolutePath 等). 成功时返回 true, 当远程文件或目录不存在时返回 false.

Link copied to clipboard
abstract suspend fun refreshed(): AbsoluteFileFolder?

返回更新了文件或目录信息 (lastModifiedTime 等) 的, 指向相同文件的 AbsoluteFileFolder. 不会更新当前 AbsoluteFileFolder 对象.

Link copied to clipboard
abstract suspend fun renameTo(newName: String): Boolean

重命名远程文件或目录, 并且修改当前(this) AbsoluteFileFoldername. 成功时返回 true, 当远程文件或目录不存在时返回 false.

Link copied to clipboard
abstract override fun toString(): String

Properties

Link copied to clipboard
abstract val absolutePath: String

绝对路径, 如 /foo/bar.txt.

Link copied to clipboard
abstract val contact: FileSupported

该对象所属 FileSupported

Link copied to clipboard

返回文件的后缀名. 如 foo.txt 返回 txt.

Link copied to clipboard
abstract val id: String

文件或目录的 ID, 即 fileIdfolderId. 该属性由服务器维护, 通常唯一且持久.

Link copied to clipboard
abstract val isFile: Boolean

表示远程文件时返回 true.

Link copied to clipboard
abstract val isFolder: Boolean

表示远程目录时返回 true.

Link copied to clipboard
abstract val lastModifiedTime: Long

远程文件或目录的最后修改时间戳, 单位秒.

Link copied to clipboard
abstract val name: String

文件名或目录名.

Link copied to clipboard

返回去掉文件后缀的文件名. 如 foo.txt 返回 foo.

Link copied to clipboard
Link copied to clipboard
abstract val uploaderId: Long

上传者 ID.

Link copied to clipboard
abstract val uploadTime: Long

远程文件或目录的创建时间, 时间戳秒.