#1 2017-04-23 12:32:42

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Information about the NeoPlugin npFile

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!

npFile.png

Offline

#2 2017-10-28 23:03:20

matty47
Member
From: Queensland Australia
Registered: 2017-10-26
Posts: 2

Re: Information about the NeoPlugin npFile

I may be misunderstanding something, however it appears that the object reference returned by npFileCreate does not work with the inbuilt file functions of Neobook.
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

Offline

#3 2017-10-28 23:18:00

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Information about the NeoPlugin npFile

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" NeoBook' 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" NeoBook'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!

Offline

#4 2017-10-29 09:21:04

matty47
Member
From: Queensland Australia
Registered: 2017-10-26
Posts: 2

Re: Information about the NeoPlugin npFile

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

Offline

#5 2017-10-29 10:08:00

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: Information about the NeoPlugin npFile

Hello Matthew,

matty47 wrote:

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. :-)

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.