[api] refactory source#file action too