Information about the NeoPlugin npFile


decsoft

Hello to all,

This plugin allow you to work with files in an advanced mode, allowing, for example, to open share exclusive files, which can be only read or write from your publication and not for others while the file are in use. You can create the File objects instances that you need. Every File instance allow you to create, read and write files, in a share exclusive mode or others. The plugin allow you to read or write the files byte by byte and more.

Press here to get more information and download the NeoPlugin npFile!



Matthew Ingle

I may be misunderstanding something, however it appears that the object reference returned by npFileCreate does not work with the inbuilt file functions of VisualNeo.
I create(open) a text file with
npFileCreate "E:\NeobookProjects\Words\words.txt" "fmOpenRead" "fmShareDenyNone" "WordFile"
then try to read the number of lines in the file
FileLen "[WordFile]" "[NumWords]"
and get a file not found error.
Is my assumption the case or did I miss something?
Thanks
Matthew


decsoft

Hello Matthew,

Certainly "WordFile" is a variable which refers to the npFile plugin created file. We must use that variable with the other plugin's actions. Basically that variable allow us to create various npFile objects, since we can use as many variables as needed.

However, what the "FileLen" VisualNeo' actions expect for their first argument is a file path, so, we can't use the above refered variable. You can save the file path when create the npFile object, but also retrieve it by the npFile's npFilePath action.

Then you can use the path with the "FileLen" VisualNeo's action. On the other hand, if you want to know the file size created by the npFile plugin you can use the npFile's npFileBytes action. Please, let me know if you have any other questions!



Matthew Ingle

Thanks for the extremely quick and helpful reply
Just learning this so making mistakes!!


decsoft

Hello Matthew,

Thanks for the extremely quick and helpful reply
Just learning this so making mistakes!!

No problem! Just one request, please: open new threads on the forum to made any questions you have, that is, instead to add more messages to this thread, except if the messages are for this thread of course. Separating the questions against threads we can maintain the forum in a better way for all of us. :-)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.