SilverScreen Solid Modeler

FindBits

FindBits

Previous topic Next topic  

FindBits

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

FindBits

 

Structure

The FindBits enumeration is used as a return value by the SilverSharp versions of the SilverScreen API routines find_first and find_next. This enumeration is a bit flag and symbolic names may be Or'd together.

 

C# Code

   

  enum FindBits

     {

     FILE_NOTFOUND,

     FILE_NORMAL,

     FILE_SUBDIR,

     FILE_HIDDEN,

     FILE_RDONLY,

     FILE_SYSTEM,

     FILE_VOLID,

     FILE_ARCHIVE,

     };

 

 

 

 

Members

See the return value definition of find_first for an explanation of the FindBits symbolic names.

 

 

See Also

find_first, find_next

 

Example

The following code searches for files with an ".env" extension in the current directory. When it finds them it adds them to the boxed-items list:

 

C# Code

 

 using SilverSharp;

 

 . . .

 

 string   buffer;

 FindBits rval = find_first("*.env", out buffer);

 

 while ( rval != FindBits.FILE_NOTFOUND )

    {

    if ( rval & FindBits.FILE_NORMAL )

       SC.attach_box_item(buffer);

 

    rval = find_next(out buffer);

    }

 

 SC.box_prompt("Select an environment file", out buffer, 1);