Working with files. - page 8

 
If you need to copy a file from a local folder to a shared folder or vice versa, use the read and write functions with the appropriate flags. What other answer would you like to hear?
Документация по MQL5: Файловые операции / FileCopy
Документация по MQL5: Файловые операции / FileCopy
  • www.mql5.com
Файловые операции / FileCopy - Документация по MQL5
 
Rosh:

If you need to copy a file from a local folder to a shared folder or vice versa, use the read and write functions with the appropriate flags. What other answer did you want to hear?
Once again. I use, as you can see from the correspondence, the FileCopy() function , not the read and write functions (in this case). This function requires a file location flag to be specified as a second non default parameter. However, there is no flag indicating the location of the file as "in local folder". Also, there is no explanation for this situation in the relevant Help section. Therefore, I would like to hear an answer to my question: "what should I specify between the first and second comma when filling in theFileCopy() parameter listfor the case when the file is located in the local folder" and why is there no information about this in the Reference Manual?
 
Yedelkin:
Again. I am using, as you can see from the correspondence, the FileCopy() function , not the read and write functions (in this case). This function requires a file location flag to be specified as the second non default parameter. However, there is no flag indicating the location of the file as "in local folder". Also, there is no explanation for this situation in the relevant Help section. Therefore, I would like to hear an answer to my question: "what should I specify between the first and second comma when filling in theFileCopy() parameter listfor the case when the file is located in the local folder" and why is there no information about this in the Handbook?

How about that. The help explicitly states

[in] Flag defining location of the file. If common_flag=FILE_COMMON, then the file is in common folder of all client terminals. Otherwise, the file is in the local folder.

"Otherwise" means any other value that does not contain the FILE_COMMON bit flag

 
stringo:

How about that. The certificate clearly states

Well... It's actually not very fair. I wouldn't be familiar with this one:

[in] The flag that specifies the location of the file. If common_flag=FILE_COMMON, then file is in common folder of all client terminals. Otherwise the file is in the local folder.

would thinkthat the file for FILE_COMMON would be in the shared folder and for say FILE_COMMON + 1 in the local folder, although this would not be the case.

Can we really introduce a constant FILE_LOCAL == 0?

 
stringo:

How about that. The help explicitly states

[in] Flag defining location of the file. If common_flag=FILE_COMMON, then the file is in common folder of all client terminals. Otherwise, the file is in the local folder.

"Otherwise" means any other value that does not contain the FILE_COMMON bit flag

Maybe it's clear to you and the pros who have spoken here what this is about. But look at the same question through the eyes of an ordinary non-professional user.

For a mediocre user like me, there is simple logic:

  1. if a parameter has no default values, it must be specified explicitly;
  2. the list of flags that apply to the common_flag parameter is specified explicitly using the "Flag" link;
  3. there is no flag for the local folder in this list;
  4. the phrase "Otherwise..." is not clear at all. "Otherwise" is when the FILE_COMMON flag is not specified. It means that the flag should not be specified at all. But it contradicts clause 1. As for being able to specify any other flags/values, there is a total blank in the description.

So if something is specified "explicitly" in the Handbook, obviously not for all :)

 
Yedelkin:

It may be clear to you and to the pros who have spoken here what it is all about. But look at the same question through the eyes of the average non-professional user.

For a mediocre user such as myself, there is simple logic:

  1. if a parameter has no default values, it must be specified explicitly;
  2. the list of flags that apply to the common_flag parameter is specified explicitly using the "Flag" link;
  3. there is no flag for the local folder in this list;
  4. the phrase "Otherwise..." is not clear at all. "Otherwise" is when theFILE_COMMON flag is not specified. It means that the flag should not be specified at all. But it contradicts clause 1. As for being able to specify any other flags/values, there is a total blank in the description.

So if something is specified "explicitly" in the Handbook, it's obviously not for everyone :)

The absence of a flag is bit 0. It's like the "Our Father's Prayer", sorry.

Why don't you ask for the multiplication rules in the documentation, and the multiplication table at the same time?

 
TheXpert:

Maybe we should really introduce the FILE_LOCAL == 0 constant?

There is a joke about a Pascal programmer. The programmer puts a glass of water on the bedside table when he gets thirsty at night. He also puts an empty glass if he is not thirsty.
 
stringo:

The absence of a flag is bit 0. It's like the "Our Father's Prayer", sorry.

Why don't you ask for the multiplication rules in the documentation and the multiplication table at the same time?

I see, you don't want to look at the problem through the eyes of a mediocre user. Thank you all for the hint about zero. As they say, let the rest of the non-professionals figure it out for themselves when they come across it.
 
Yedelkin:
I see, you don't want to look at the problem through the eyes of a mediocre user. Thank you all for the tip about zero. As they say, let the rest of the non-professionals figure it out for themselves when they come across it.

This is where we communicate so that those "non-professionals" can learn something. Don't we?

And we are unlikely to enter such details in the documentation. I already told you about it once. And I gave my reasons.

 
stringo:

This is where we communicate so that those "non-professionals" can learn something. Don't we?

Absolutely. And I've stressed that many times. But if the documentation had a short, unambiguously understandable sentence - there would be no communication :)

stringo:

We will hardly put such details in the documentation. I already told you about it once. And gave my reasons.

Such a topic will come up more than once. During the time of discussion of this particular issue I could find 20 seconds to fix 2-3 words in the documentation. But it's a matter of outlook, as I see it :)

Reason: