Patent attributes
A method for reading and writing files includes: receiving an access request, and acquiring file identifier information and first user identifier information according to the access request; querying a cache server for a locked file corresponding to the file identifier information, and acquiring a first original file corresponding to the file identifier information from a file server if the locked file corresponding to the file identifier information is not found; generating a locked file according to the first user identifier information and the first original file, and submitting the locked file to the cache server; and receiving an editing operation for the first original file, and submitting the edited first original file to the cache server. The method prevents the users from submitting conflicting contents when operating the same file, so that a Web IDE system may play a more important role in multiple collaborative development processes.