Euphoria Ticket #776: Undocumented feature of walk_dir()

I tried to write some function similar to xcopy using the walk_dir() routine, but I needed to supply the "your_function" with an additional data such as destination directory, overwriting flag etc.

So I looked to the walk_dir() code and found that the routine already has such functionality:

public function walk_dir(sequence path_name, object your_function, integer scan_subdirs = types:FALSE, 
                         object dir_source = types:NO_ROUTINE_ID) 
    -- snip 
    if sequence(your_function) then 
        user_data = append(user_data, your_function[2]) 
        your_function = your_function[1] 
    end if 
    -- snip 
        abort_now = call_func(your_function, user_data) 
    -- snip 
end function 

It would be nice if this useful feature was documented.

Details

Type: Bug Report Severity: Textual Category: Documentation
Assigned To: mattlewis Status: Fixed Reported Release: 4.0.4
Fixed in SVN #: View VCS: none Milestone: 4.0.6

1. Comment by SDPringle Nov 16, 2012

  • setting milestone (not fixed in 4.0.5)

2. Comment by mattlewis Feb 27, 2013

See: hg:euphoria/rev/770fab24d222

changeset: 6004:770fab24d222 branch: 4.0 parent: 6002:806754addbe0 user: Matt Lewis date: Wed Feb 27 15:02:54 2013 -0500 files: docs/release/4.0.6.txt include/std/filesys.e description:

  • updated walk_dir parameter documentation
  • fixes ticket 776

Search



Quick Links

User menu

Not signed in.

Misc Menu