implement the rest rpc methods about file