Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

FileSel based utility functions

These functions simplify opening files using single global file-selector. The configuration of file-selector is stored into global configuration.

 

 

Function List

 

String SelectFileOpen(const char *types)

Selects file for opening, types follow rules of Types method of FileSel. If selections is canceled, returns empty String.

 


 

String SelectFileSaveAs(const char *types)

Selects file for saving, types follow rules of Types method of FileSel. If selections is canceled, returns empty String.

 


 

String SelectDirectory()

Selects directory.

 


 

String SelectLoadFile(const char *types)

Selects file and loads it, types follow rules of Types method of FileSel. If selections is canceled or file cannot be opened, returns empty String::GetVoid().

 


 

bool SelectSaveFile(const char *types, const String& data)

Selects file and saves data to it, types follow rules of Types method of FileSel. Returns true on success.

 

 

 

 

SelectFileIn class

This class inherits FileIn. Its constructor invokes global FileSel and opens selected file for reading:

 

SelectFileIn(const char *types)

types follow rules of Types method of FileSel. In case of any failure (selection is canceled, open fails), the resulting object is not in opened state (can be tested using operator bool).

 

 

 

 

SelectFileOut class

This class inherits FileOut. Its constructor invokes global FileSel and opens selected file for writing:

 

SelectFileOut(const char *types)

types follow rules of Types method of FileSel. In case of any failure (selection is canceled, open fails), the resulting object is not in opened state (can be tested using operator bool).

 

 

Do you want to contribute?