Update vendored windows libs

This commit is contained in:
Labrys of Knossos 2022-11-28 05:59:32 -05:00
commit b1cefa94e5
226 changed files with 33472 additions and 11882 deletions

View file

@ -0,0 +1,10 @@
from jaraco.windows.api.filesystem import ReplaceFile
open('orig-file', 'w').write('some content')
open('replacing-file', 'w').write('new content')
ReplaceFile('orig-file', 'replacing-file', 'orig-backup', 0, 0, 0)
assert open('orig-file').read() == 'new content'
assert open('orig-backup').read() == 'some content'
import os
assert not os.path.exists('replacing-file')

View file

@ -0,0 +1,22 @@
from jaraco.windows.filesystem import trace_symlink_target
from optparse import OptionParser
def get_args():
parser = OptionParser()
options, args = parser.parse_args()
try:
options.filename = args.pop(0)
except IndexError:
parser.error('filename required')
return options
def main():
options = get_args()
print(trace_symlink_target(options.filename))
if __name__ == '__main__':
main()