[Swift-devel] Standard Library Proposal/Discussion Page
Yadu Nand Babuji
yadunand at uchicago.edu
Thu Jan 22 14:55:25 CST 2015
Replies inline
-Yadu
On 01/22/2015 02:46 PM, Mihael Hategan wrote:
> On Thu, 2015-01-22 at 14:14 -0600, Yadu Nand Babuji wrote:
>>>> remove (/rm)
>>>> move ? ( python doesn't seem to have this)
>>> Like move and remove files? Do you have an example of how these would be
>>> used?
>> I remember a case where a directory is actively getting filled with data
>> that needs to be processed.
>> So, we map the input_queue directory, "move" the file to the active
>> directory and start the processing.
>>
>> file active_files[] <simple_mapper; location="active_list", prefix="active"> ;
>> file completed[];
>>
>> iterate ( ){
>> file new_files[] = <simple_mapper; location="input_queue", prefix="foo">;
>> foreach f in new_files{
>> move ( f, active_files[length(active_files)] ); # We move the file, so that it is not processed again in the next round.
>> completed[length(completed)] = process(active_file);
>> sleep(60);
>> }
>> }until ( status == 10000 );
> Does this work without move()? Say, by doing the move in a script as
> part of process()?
Of course, that is possible. The only reason I though that an explicit
move/remove would make sense is because
I think swift should be handling the movement of files involved in the
run. Perhaps this isn't as clean as I thought it'd be.
> Mihael
>
More information about the Swift-devel
mailing list