search for: pathstriptoroot

Displaying 2 results from an estimated 2 matches for "pathstriptoroot".

2008 Aug 18
0
Playing with NtQueryInformationFile
...9; require ''windows/path'' include Windows::FileSystem include Windows::Path file = "C:\\test.txt" sectors = [0].pack(''L'') bytes = [0].pack(''L'') free = [0].pack(''L'') total = [0].pack(''L'') if PathStripToRoot(file) file += "\\" unless file[-1].chr == "\\" # Add a trailing slash else file = nil # Default to relative root path end if GetDiskFreeSpace(file, sectors, bytes, free, total) size = sectors.unpack(''L'').first * bytes.unpack(''L'').fir...
2007 Sep 29
0
Pass by reference bug in win32/api?
I spotted this as the result of the latest win32-file-stat tests I''ve been running: require ''windows/path'' include Windows::Path file1 = ''test'' file2 = file1.dup PathStripToRoot(file1) p file1 => "\000est" p file1 => "\000est" Win32API (stdlib) doesn''t do this. Is this our fault? Regards, Dan