How to model file system operations with REST?

后端 未结 6 1346
挽巷
挽巷 2021-01-19 05:07

There are obvious counterparts for some of file systems\' basic operations (eg. ls and rm), but how would you implement not straightforwardly RESTf

6条回答
  •  一生所求
    2021-01-19 05:32

    One way to do this is to formulate your PUT/POST requests such that you can either give the actual data or give the URL of the resource, possibly with the option to make a hard or symbolic link. If the given URL is hosted on your own system, then you can simply point internally to the same file, possibly keeping a bit for "copy-on-write" or something along those lines in order to make it efficient.

提交回复
热议问题