FileBrowser(3I)

NAME

   FileBrowser - browse and/or select file names

SYNOPSIS

   #include <InterViews/filebrowser.h>

DESCRIPTION

   FileBrowser is a StringBrowser that displays file names. In addition to
   the standard  StringBrowser  constructor  parameters,  the  FileBrowser
   constructor  takes  a  directory  name as an argument.  The FileBrowser
   scans the corresponding directory, appending the file names to its list
   of  strings.   FileBrowser  lets  the  user choose a file name, and the
   application queries the FileBrowser for the chosen file.

PUBLIC OPERATIONS

   FileBrowser(ButtonState*, const char* dir, int rows, int cols,  boolean
   uniqueSel, int highlight, const char* done)
   FileBrowser(const  char*  name,  ButtonState*,  const  char*, int, int,
   boolean, int, const char*)
          Create a new FileBrowser object.  The ButtonState,  rows,  cols,
          uniqueSel,  highlight,  done, and name parameters have semantics
          identical  to   those   of   the   corresponding   StringBrowser
          parameters.  The dir parameter specifies the directory to search
          for  file  names.   Internally,  FileBrowser  prepends  dir   to
          relative  path  specifications  in operations that require them,
          thus avoiding a chdir(2).

   boolean IsADirectory(const char*)
          Return whether or not the given relative path corresponds  to  a
          valid directory.

   boolean SetDirectory(const char* newdir)
          Change  the  search  directory  to  newdir  if that directory is
          accessible.  The function returns true if successful.

   const char* GetDirectory()
          Return the name of the search directory.

   const char* ValidDirectories(const char* path)
          Given a path string, return the largest substring (starting from
          the  beginning  of  path)  that  represents  a  valid path.  The
          substring is returned in a static buffer and  should  be  copied
          before use.

   const char* Normalize(const char* path)
          Return  a  normalized version of path with all spurious slashes,
          dots, and tildes interpreted.  The normalized path  is  returned
          in a static buffer and should be copied before use.

   const char* Path(int i)
          Return  the  ith  string as it appears in the FileBrowser.  This
          function prepends the search directory to the string, normalizes
          the concatenation, and returns the result.

   void RereadDirectory()
          Rescan  the current directory without updating the FileBrowser's
          appearance.

   virtual void Update()
          Rescan  the  current  directory  and  update  the  FileBrowser's
          appearance  to reflect any changes in the set of files it should
          display.

   void SetTextFilter(const char*)
   void SetDirectoryTextFilter(const char*)
   void SetModeFilter(int)
   void SetDirectoryModeFilter(int)
          By default, FileBrowser displays all the files  and  directories
          it  finds in the search directory.  These functions provide some
          control   over   the   entries   that   FileBrowser    displays.
          SetTextFilter specifies a regular expression (see Regexp(3I)) to
          match  against  file  names.   SetDirectoryTextFilter  serves  a
          similar   role   for   directory   names.    SetModeFilter   and
          SetDirectoryModeFilter specify  the  mode  (see  chmod(1))  that
          displayed  files  and  directories  should have.  Only files and
          directories that match both the regular expression and the  mode
          will  appear  in  the  FileBrowser.  Passing nil for the regular
          expression or 0 for the mode restores the default behavior.

PROTECTED OPERATIONS

   void UpdateStrings()
          Explicitly update the FileBrowser's appearance  to  reflect  any
          changes in the set of files it should display without rescanning
          the directory.

   virtual boolean Acceptable(const char*)
          Return whether the given file name is an  acceptable  name.   By
          default,   files  that  conform  to  the  text  or  mode  filter
          specifications are acceptable.  Only acceptable  files  will  be
          displayed by UpdateStrings.

SEE ALSO

   Interactor(2I), Button(3I), StringBrowser(3I), Regexp(3I), chmod(1)



Opportunity


Personal Opportunity - Free software gives you access to billions of dollars of software at no cost. Use this software for your business, personal use or to develop a profitable skill. Access to source code provides access to a level of capabilities/information that companies protect though copyrights. Open source is a core component of the Internet and it is available to you. Leverage the billions of dollars in resources and capabilities to build a career, establish a business or change the world. The potential is endless for those who understand the opportunity.

Business Opportunity - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies know about open source and how open source can give you the advantage.


Free Software


Free Software provides computer programs and capabilities at no cost but more importantly, it provides the freedom to run, edit, contribute to, and share the software. The importance of free software is a matter of access, not price. Software at no cost is a benefit but ownership rights to the software and source code is far more significant.

Free Office Software - The Libre Office suite provides top desktop productivity tools for free. This includes, a word processor, spreadsheet, presentation engine, drawing and flowcharting, database and math applications. Libre Office is available for Linux or Windows.


Free Books


The Free Books Library is a collection of thousands of the most popular public domain books in an online readable format. The collection includes great classical literature and more recent works where the U.S. copyright has expired. These books are yours to read and use without restrictions.

Source Code - Want to change a program or know how it works? Open Source provides the source code for its programs so that anyone can use, modify or learn how to write those programs themselves. Visit the GNU source code repositories to download the source.


Education


Study at Harvard, Stanford or MIT - Open edX provides free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses for almost all major subjects and course levels. Open edx also offers some paid courses and selected certifications.

Linux Manual Pages - A man or manual page is a form of software documentation found on Linux/Unix operating systems. Topics covered include computer programs (including library and system calls), formal standards and conventions, and even abstract concepts.