Re: Re: HTTP_Upload unique files

From: Date: Sat, 02 Oct 2004 22:00:33 +0000
Subject: Re: Re: HTTP_Upload unique files
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-33622@lists.php.net to get a copy of this message
Ammar Ibrahim wrote:
1) what should the "type" of this naming be? My suggested name is 'uniq_seq' which stands for, unique sequence
I prefer 'seq'.
2) A new utility function needs to be written '_get_last_sequence($file_path)' This is helpful to get the last sequence number of a base file name e.g $last_seq = _get_last_sequence('userGuide.pdf') if the following files exist in the folder( userGuide[1].pdf, userGuide[5].pdf) the function returns 5 or false if no file exists with the same base name 3) A new utility function _ge_seq_file_name($base_file_name) which automatically adds one to the highest sequence. Returns the final name for the file to be written
This package wouldn't benefit of having two seperate functions for this, I say put them simply into one. Regarding the function name, I prefer nameToSeq(). -- Regards, Norbert Mocsnik http://norbert.mocsnik.hu/

« previous php.pear.dev (#33622) next »