How to check if a file has been opened by another application in C++?

后端 未结 10 1842
耶瑟儿~
耶瑟儿~ 2020-12-02 01:55

I know, that there\'s the is_open() function in C++, but I want one program to check if a file hasn\'t been opened by another application. Is there any way to d

10条回答
  •  难免孤独
    2020-12-02 02:27

    Nope. Unless other application uses advisory locks.

    See http://docs.sun.com/app/docs/doc/816-0213/6m6ne37v5?a=view

提交回复
热议问题