Can we get file deletion in windows without raising an error because the file happens to be opened by some program?
Not without breaking every program under the sun. Currently, programs on Windows can assume that the file associated with a path won't change while the file is open (at least I hope so or some of my code is a bit racy...).
Symlinks in Windows 10
11–17 of 17 posts
Re: Symlinks in Windows 10
#12Earlier quoted context omitted.
Not without breaking every program under the sun. Currently, programs on Windows can assume that the file associated with a path won't change while the file is open (at least I hope so or some of my code is a bit racy...).
Same goes for directories, yeah. The linux approach can create some really bad user experiences and weird bugs. It's sysadmin-friendly but no good for regular people.
Re: Symlinks in Windows 10
#13Can we get file deletion in windows without raising an error because the file happens to be opened by some program?
Not without breaking every program under the sun. Currently, programs on Windows can assume that the file associated with a path won't change while the file is open (at least I hope so or some of my code is a bit racy...).
Or, if you wanted to be extra careful, just introduce a new locking flag (LOCK_DONT_LOCK_CAN_DELETE or whatever :-)). Then bug the authors of the most popular editors and the most buggy applications (which block files unneccesarily) to set the flag. If you want to, you could create a compatibility shim to force enable / disable this feature for a given application. (Edit: apparently this flag already exists? FILE_SHARE_DELETE?)
This is tricky, but probably not harder than e.g. modernizing the console subsystem.
Re: Symlinks in Windows 10
#14Can we get file deletion in windows without raising an error because the file happens to be opened by some program?
Not without breaking every program under the sun. Currently, programs on Windows can assume that the file associated with a path won't change while the file is open (at least I hope so or some of my code is a bit racy...).
I suspect that the breakage would be fairly limited, and I for one would love for this to happen. The amount of stuff which can't be done because of this design decision is huge; proper package management without numerous reboots would be one, and I think the benefit of that and having semantics common with Unix platforms would outweigh the breakage.
Re: Symlinks in Windows 10
#15Re: Symlinks in Windows 10
#16Why create a new util when Mark Russinovich already created 'Junction'. Aren't these the same thing? https://technet.microsoft.com/en-us/sysinternals/bb896768.as...
The `mklink` tool in Windows is also by no means new; it's been around for many years. It just wasn't very useful since you needed to be an admin to use symbolic links, anyway.