开发者

File operation using Javascript or jQuery

开发者 https://www.devze.com 2023-02-28 22:19 出处:网络
I want to make some file operation using Javascript or jQuery like: File create File write File re开发者_运维技巧ad

I want to make some file operation using Javascript or jQuery like:

  1. File create
  2. File write
  3. File re开发者_运维技巧ad
  4. Update
  5. Remove/delete

Is it possible to do above stuffs? If possible, from where I can get the idea? Please suggest me.In any end (client/server) how can it be done?i asked this just for know!


There are 2 HTML5 APIs of interest.

The File API which allows you to read files (of a users choice). Most modern browsers implement this.

The File Write API which allows you to write to files. No browsers implement this as of now.

I presume you can also use IE only ActiveX controls to do file manipulation on windows.


In any end (client/server)

You weren't specific about which server side JS implementation you are using, so for Node.js:

See the file system section of the Node.js documentation


As I can understand from your question you are trying to do file operation at client end. If you are using IE and windows operating system, you can do that using FileSystemObject. This doesn't work for other browser and other operating systems as FileSystemObject is ActivexObject given by Windows. For details refer http://www.codeproject.com/KB/scripting/JavaScript__File_Handling.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消