Forum > Unix

[SOLVED] FileOpen and fpOpen diff

<< < (2/2)

PascalDragon:

--- Quote from: claudioya on January 24, 2024, 12:28:57 am ---I understand, using "fmShareDenyNone" fails using into second function call if not used in first. But, if use this in first call work fine. This problem is when external application lock this file, CopyFile() will be useless. Other applications don't have this problem.
--- End quote ---

It doesn't matter what other applications do. FileOpen is an Object Pascal function that needs to behave according to the rules laid down for that function.


--- Quote from: claudioya on January 24, 2024, 12:28:57 am ---In mi opinion, FileOpen should not lock file by default, allowing copy or read file opened by other process. You consider report this?
--- End quote ---

There is no need to report this, because this is by design. The default behavior without any explicit ttShareDenyNone is to open the file exclusively. That's how the function supposed to behave no matter the platform.

claudioya:

--- Quote from: PascalDragon on January 27, 2024, 05:51:38 pm ---
--- Quote from: claudioya on January 24, 2024, 12:28:57 am ---I understand, using "fmShareDenyNone" fails using into second function call if not used in first. But, if use this in first call work fine. This problem is when external application lock this file, CopyFile() will be useless. Other applications don't have this problem.
--- End quote ---

It doesn't matter what other applications do. FileOpen is an Object Pascal function that needs to behave according to the rules laid down for that function.


--- Quote from: claudioya on January 24, 2024, 12:28:57 am ---In mi opinion, FileOpen should not lock file by default, allowing copy or read file opened by other process. You consider report this?
--- End quote ---

There is no need to report this, because this is by design. The default behavior without any explicit ttShareDenyNone is to open the file exclusively. That's how the function supposed to behave no matter the platform.

--- End quote ---

i understand this. Thank you.

Navigation

[0] Message Index

[*] Previous page

Go to full version