Mercurial > public > mercurial-scm > hg
comparison mercurial/win32.py @ 8329:79a12651d46b
win32: clarify comment regarding use of fdopen
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Thu, 26 Mar 2009 13:14:35 -0700 |
parents | 91f1fe78454c |
children | b6d0fa8c7685 |
comparison
equal
deleted
inserted
replaced
8328:91f1fe78454c | 8329:79a12651d46b |
---|---|
268 '''file object with posix-like semantics. on windows, normal | 268 '''file object with posix-like semantics. on windows, normal |
269 files can not be deleted or renamed if they are open. must open | 269 files can not be deleted or renamed if they are open. must open |
270 with win32file.FILE_SHARE_DELETE. this flag does not exist on | 270 with win32file.FILE_SHARE_DELETE. this flag does not exist on |
271 windows < nt, so do not use this class there.''' | 271 windows < nt, so do not use this class there.''' |
272 | 272 |
273 # tried to use win32file._open_osfhandle to pass fd to os.fdopen, | 273 # ideally, we could use win32file._open_osfhandle and avoid this |
274 # but does not work at all. wrap win32 file api instead. | 274 # class entirely, but we would need the win32 _fdopen function, |
275 # which is not exported by the win32file module. | |
275 | 276 |
276 def __init__(self, name, mode='rb'): | 277 def __init__(self, name, mode='rb'): |
277 self.closed = False | 278 self.closed = False |
278 self.name = name | 279 self.name = name |
279 self.mode = mode | 280 self.mode = mode |