I am writing a program in c ++ that verifies an ftp directory and reads file by file. My question is this: Is there any way to block the file that prevents access from other programs? For example, if the programs run on a different machine and read the file twice. The program is going to run over linux and windows. The folder with the files that are going to be opened will be in a remote machine, accesing via shared directory or via ftp
Asked
Active
Viewed 134 times
1
-
You should try something and then approach for any suggestions or query – Xay Mar 26 '18 at 19:42
-
5Files are not a C++ concept but a host operating system concept. For that reason, it's important to include information on your host operating system in question. – Stephen M. Webb Mar 26 '18 at 19:43
-
1I voted for re-open because a) The mentioned "answer" has no reference to ftp. b) and in this post, I see no assurance that the 'ftp directory' is 'local' (on same system) with the c++ program. – 2785528 Mar 27 '18 at 12:29
-
In fact the ftp directory is not local – Jose Luis Bernal Castillo Mar 27 '18 at 12:34
-
@JoseLuisBernalCastillo - you might consider re-submitting your question ... but you would probably have better luck googling ... using Google I quickly found https://stackoverflow.com/q/14120538/2785528. and several others. Note that the referenced question does not mention streams (because ftp is not part of C++, and ftp transfers are not C++ streams). Review the work you find, and do not let those answers discourage your effort. Note: I have written ftp for embedded systems, and I know you can achieve your specific goal. On your next post, show some code, at least a [MCVP] – 2785528 Mar 31 '18 at 22:35