I want to make some file operation using Javascript or jQuery like:
- File create
- File write
- File re开发者_运维技巧ad
- Update
- 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
精彩评论