[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Example using fgetstatus from AB4.85 please



PureBytes Links

Trading Reference Links

>From the beta Readme file 4.85
 * AFL: fgetstatus( filename, what, format = 0 )
      Implemented

      fgetstatus( filename, what, format = 0 )

      function that retrieves file properties/Status.

      Returns NUMBER OR STRING depending on format parameter
      if file does NOT exist it returns Null.

      Parameters:

      filename - the Name of the file (with OR without full path) to query
      what - specifies what file property to retrieve, allowable values
      0 - the Date/time the file was created
      1 - the Date/time the file was last modified
      2 - the Date/time the file was last accessed for reading
      3 - the file size in bytes
      4 - attribute byte of the file

      format - specifies return format of Date/time values (format
specifications are the same as
         in Now() function):
      allowed values:
      0 - returns string containing Date/time formatted according to system
settings
      1 - returns string containing Date only formatted according to system
settings
      2 - returns string containing time only formatted according to system
settings
      3 - returns DateNum number with Date
      4 - returns TimeNum number with time
      5 - returns DateTime number with Date/time
      6 - returns Date Day (1..31)
      7 - returns Date Month (1..12)
      8 - returns Date Year (four digit)
      9 - returns Date Day OF WEEK (1..7, where 1=Sunday, 2=Monday, AND so
on)
      10 - returns Date Day OF Year (1..366)

      Note that Windows supports only 2 Second resolution of file Date/time
stamps.

      Example:

      // get modification date string of portfolio.afl file
      fgetstatus("formulas\\Equity\\portfolio.afl",1,0);


-- 
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com

On 21/12/06, bistrader <bistrader@xxxxxxxxx> wrote:
>
> Hello,
>
> I am working with fgetstatus from AB4.85 and not getting anywhere.
> Could someone post an example with an Exploration providing whatever
> fgetstatus returns to your afl?
>
> I am trying to use fgetstatus to find out if a file exists.  If it
> does, then I will have my afl do one thing and if not then I will have
> the afl do something else.
>
> Thanks for the help.
>
> ...
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.25/593 - Release Date: 12/19/2006 1:17 PM