summaryrefslogtreecommitdiffstats
path: root/util/system/fs_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* feat contrib: aiogram 3armenqa2024-01-191-0/+3
| | | | Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
* add windows platform to ydb github exportalexv-smirnov2022-12-201-0/+255
|
* fix ya.makemonster2022-07-071-255/+0
|
* Remove read-only files and directories on Windows (to match behavior on unix)setser2022-03-161-0/+4
| | | | | | | | | | Current behavior of RemoveDirWithContents does not allow removing directories if any of files in this directory is read-only. This behavior, however, does not allow, for example, to remove temporary directory, in which git repository was created (on *nix systems, however, this problem was not noticed). This PR overrides this behavior. ref:1faf91e233008b4aece4f2b953884b52346ce2be
* fix CLion perf warnings - use const references instead of passing by valuetobo2022-02-241-1/+1
| | | | ref:e94e72a813a3aa41c543fd1d9f7d73f02cca8bc0
* [util] fix fstat for archive directories on windowskikht2022-02-171-16/+34
| | | | | | | | | | | | | | | | | | | Currently TFileStat has a bunch of problems on Windows: 1. Mode computation ORs different types, but file attributes it checks are not mutually exclusive. E.g. it is possible for directory to have both `FILE_ATTRIBUTE_DIRECTORY` and `FILE_ATTRIBUTE_ARCHIVE`, but it will currently lead to invalid `_S_IFDIR | _S_IFREG` mode. 2. Any file with `FILE_ATTRIBUTE_REPARSE_POINT` flag is considered to be symlink. But there are many other types of reparse points even user-defined ones. For more info see https://docs.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags To fix all this we do the following: 1. Add `ReparseTag` field to `TSystemFStat` and fill it for reparse points in `GetStatByHandle`. 2. Refactor `GetWinFileType` out of `GetFileMode` to ensure that we always select only single `S_IFMT` value. 3. Pass reparse tag value into `GetWinFileType` and select `S_IFLNK` only for `IO_REPARSE_TAG_SYMLINK` and `IO_REPARSE_TAG_MOUNT_POINT` tags. The latter one is a bit strange, but this behaviour is aligned with current implementation of `WinReadLink`. 4. Factor `ReadReparsePoint` out of `WinReadLink`. This function uses `DeviceIoControl` to read reparse point data into structures copied from WDK. 5. Add `WinReadReparseTag` that uses `ReadReparsePoint` to extract reparse point tag. We use this approach instead of MSDN-recommended `FindFirstFile` because latter requires file path, but we have file handle at this point. AFAIK golang and python use similar approach for this. 6. Add test for archived directory case. 7. Make symlink nofollow tests run only when symlink creation is possible for current user. Discovered in https://st.yandex-team.ru/ARC-3931 ref:4f6735817b9f85f3351a1021a56dd7eb4606bd65
* Restoring authorship annotation for Vasily Gerasimov ↵Vasily Gerasimov2022-02-101-16/+16
| | | | <[email protected]>. Commit 2 of 2.
* Restoring authorship annotation for Vasily Gerasimov ↵Vasily Gerasimov2022-02-101-16/+16
| | | | <[email protected]>. Commit 1 of 2.
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.melkov2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.melkov2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.yazevnul2022-02-101-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.yazevnul2022-02-101-8/+8
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.nalpp2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.nalpp2022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.leo2022-02-101-45/+45
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.leo2022-02-101-45/+45
|
* Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. ↵Vlad Yaroslavlev2022-02-101-26/+26
| | | | Commit 2 of 2.
* Restoring authorship annotation for Vlad Yaroslavlev <[email protected]>. ↵Vlad Yaroslavlev2022-02-101-26/+26
| | | | Commit 1 of 2.
* Restoring authorship annotation for Ilnur Khuziev <[email protected]>. ↵Ilnur Khuziev2022-02-101-34/+34
| | | | Commit 2 of 2.
* Restoring authorship annotation for Ilnur Khuziev <[email protected]>. ↵Ilnur Khuziev2022-02-101-34/+34
| | | | Commit 1 of 2.
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.danlark2022-02-101-3/+3
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.danlark2022-02-101-3/+3
|
* Restoring authorship annotation for <[email protected]>. Commit 2 of 2.krock212022-02-101-1/+1
|
* Restoring authorship annotation for <[email protected]>. Commit 1 of 2.krock212022-02-101-1/+1
|
* Restoring authorship annotation for Anton Samokhvalov <[email protected]>. ↵Anton Samokhvalov2022-02-101-98/+98
| | | | Commit 2 of 2.
* Restoring authorship annotation for Anton Samokhvalov <[email protected]>. ↵Anton Samokhvalov2022-02-101-98/+98
| | | | Commit 1 of 2.
* intermediate changesDevtools Arcadia2022-02-071-0/+233
ref:cde9a383711a11544ce7e107a78147fb96cc4029