Displaying 3 results from an estimated 3 matches for "hfind".
Did you mean:
find
2007 Oct 04
0
Prototyping the Dir class
...unless RemoveDirectory(dirname)
raise ArgumentError, get_last_error
end
end
# Blend entries and foreach into one method
def self.entries(dirname)
dirname += "\\*"
fdata = 0.chr * 320 # 580 if wide
array = block_given? ? [] : nil
hfind = FindFirstFile(dirname, fdata)
if hfind == INVALID_HANDLE_VALUE
raise ArgumentError, get_last_error
end
file = fdata[44, MAX_PATH].unpack("Z*")[0]
if block_given?
yield file
else
array << file
end
wh...
2007 Oct 21
0
Taking a stab at a pure Ruby Dir.glob
...')''
}
pattern << ''$''
pattern.gsub!(/\[.*?\]/, '''')
puts "NEW PATTERN: ''#{pattern}''"
regex = Regexp.new(pattern)
fdata = 0.chr * 320 # 580 if wide
array = []
hfind = FindFirstFile(dirname, fdata)
if hfind == INVALID_HANDLE_VALUE
raise ArgumentError, get_last_error
end
file = fdata[44, MAX_PATH].unpack("Z*")[0]
array << file if regex.match(file)
while FindNextFile(hfind, fdata)
file = f...
2007 Nov 26
1
DFS enumeration on a Samba hosted DFS tree.
...SS) {
for(iterator=1;iterator<=numEntries;iterator++) {
info = dfsEntry->Storage;
for(numStorage=dfsEntry->NumberOfStorages;numStorage>0;numStorage--) {
swprintf_s(buffer,MAX_PATH,L"\\\\%s\\%s\\*",info->ServerName,info->ShareName);
hFind = FindFirstFile(buffer,&FindFileData); // If you can
list the contents of a UNC, odds are it isn't broken.
}
}
result = NetDfsEnum(argv[1],3,MAX_PREFERRED_LENGTH,(LPBYTE
*)&root,&numEntries,&hResume);
}
This obviously is not complete but basically this will run...