KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIPLATFORM::IO Namespace Reference

Functions

FILE * SeqFOpen (const wxString &aPath, const wxString &mode)
 Opens the file like fopen but sets flags (if available) for sequential read hinting. More...
 
bool DuplicatePermissions (const wxString &aSrc, const wxString &aDest)
 Duplicates the file security data from one file to another ensuring that they are the same between both. More...
 

Function Documentation

◆ DuplicatePermissions()

bool KIPLATFORM::IO::DuplicatePermissions ( const wxString &  aSrc,
const wxString &  aDest 
)

Duplicates the file security data from one file to another ensuring that they are the same between both.

This assumes that the user has permission to set #aDest

Returns
true if the process was successful

Definition at line 39 of file gtk/io.cpp.

Referenced by EDA_BASE_FRAME::CheckForAutoSaveFile(), FP_CACHE::Save(), PL_EDITOR_FRAME::SaveDrawingSheetFile(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::saveSchematicFile(), FOOTPRINT_LIST_IMPL::WriteCacheToFile(), STEP_PCB_MODEL::WriteGLTF(), and STEP_PCB_MODEL::WriteSTEP().

◆ SeqFOpen()

FILE * KIPLATFORM::IO::SeqFOpen ( const wxString &  aPath,
const wxString &  mode 
)

Opens the file like fopen but sets flags (if available) for sequential read hinting.

Only use this variant of fopen if the file is truely going to be read sequentially only otherwise you may encounter performance penalities.

Windows in particular is a little ulgy to set the sequential scan flag compared to say linux and it's posix_fadvise

Definition at line 29 of file gtk/io.cpp.

Referenced by FILE_LINE_READER::FILE_LINE_READER().