文件操作 - update-file-info-async.py
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/python-caja/examples/update-file-info-async.py
编辑文件内容
from gi.repository import Caja, GObject, GLib class UpdateFileInfoAsync(GObject.GObject, Caja.InfoProvider): def __init__(self): pass def update_file_info_full(self, provider, handle, closure, file): print "update_file_info_full" GLib.timeout_add_seconds(3, self.update_cb, provider, handle, closure) return Caja.OperationResult.IN_PROGRESS def update_cb(self, provider, handle, closure): print "update_cb" Caja.info_provider_update_complete_invoke(closure, provider, handle, Caja.OperationResult.FAILED)
修改文件时间
将文件时间修改为当前时间的前一年
删除文件