summaryrefslogtreecommitdiff
path: root/libs/pbd/pbd/file_utils.h
AgeCommit message (Collapse)Author
2016-09-19Move PBD::canonical_path to pbd/file_utils.h/cc and reimplement for WindowsTim Mayberry
This fixes the libpbd testCanonicalPathUTF8 and libardour open_session_utf8_path unit tests You can now have Sessions with localized names containing characters that aren't in the system codepage on Windows. It also fixes the issue where a Session would not open when it was moved into a path with characters that aren't in the system codepage. The only use case for calling canonical_path/realpath on the session path AFAICT is for resolving relative paths that are passed via the command line/terminal. I'm doubtful that works correctly on Windows because of character encoding issues with the current API we use for that(not glib), so it is slightly ironic that this issue was caused by an incorrect implementation of a function that is not really necessary on Windows at this point in time.
2015-10-04globally remove all trailing whitespace from ardour code base.Paul Davis
Paul Davis was responsible for introducing almost all of this.
2015-09-27update semantics of PBD::remove_directory()Robin Gareus
Remove the directory recursively including itself. The function is used in two places only: * LV2Plugin::add_state() -- no change, remove tmp. state * Session::save_as() -- on error, remove target In both cases removing the folder itself is correct.
2015-07-26Move ARDOUR::touch_file to pbd/file_utils.hTim Mayberry
2015-03-16add PBD::toggle_file_existence()Paul Davis
2015-03-03recursive regexp file search.Robin Gareus
2014-12-03Add PBD::tmp_writable_directory utility function to pbd/file_utils.h/ccTim Mayberry
2014-09-28recursive file copy functionRobin Gareus
2014-07-08Add PBD::get_suffix() for ripping file suffixes from pathsPaul Davis
2014-06-25Change PBD::get_files and PBD::get_paths to take a Searchpath instead of ↵Tim Mayberry
directory path Both these functions use the internal function run_functor_for_paths which takes a Searchpath so this avoids a temporary variable in cases where a Searchpath is passed directly. The usage is the same as the compiler will generate a temporary Searchpath from a string(directory path) if necessary.
2014-06-25Add/Update docs in pbd/file_utils.hTim Mayberry
2014-06-25Rename PBD::get_files_in_directory to just PBD::get_files, change parameter ↵Tim Mayberry
order and fix docs
2014-06-25Rename PBD::get_directory_contents to PBD::get_pathsTim Mayberry
shorter name and change order of parameters to match other functions
2014-06-25Add function PBD::find_paths_matching_filterTim Mayberry
2014-06-25Move functions in pbd/clear_dir.h/cc into pbd/file_utils.h/ccTim Mayberry
2014-06-25Rename PBD::find_file_in_search_path to just PBD::find_fileTim Mayberry
saves a bit of typing and not necessary if you look at how it is used.
2014-06-25Use PBD::find_files_matching_pattern instead of other variationsTim Mayberry
2014-06-25Add a variation of PBD::find_files_matching_pattern for convenienceTim Mayberry
2014-06-25Add new function PBD::find_files_matching_patternTim Mayberry
This new function is intended to replace the three existing PBD::find_matching_files_* functions. The order of parameters matches find_files_matching_regex and find_files_matching_filter
2014-06-25Change PBD::find_files_matching_regex and PBD::find_files_matching_filter to ↵Tim Mayberry
take a Searchpath
2014-06-25Remove limit parameter from PBD::find_files_matching_regexTim Mayberry
This limit was not used or documented. The same functionality can be performed when iterating through the results.
2014-06-25Remove parameters from PBD::find_files_matching_regexTim Mayberry
The only users of this API always used the same options so just remove them.
2014-06-25Add PBD::get_directory_contents to pbd/file_utils.hTim Mayberry
2014-06-17Add default arguments to match those in PathScanner::operator()Tim Mayberry
2014-06-17Move member functions from PathScanner to functions in pbd/file_utils.hTim Mayberry
This allows us to remove PathScanner source file and keep PathScanner class as header only until it is removed
2013-10-18Merge remote-tracking branch 'remotes/origin/exportvis' into windows+ccJohn Emmas
Conflicts (hopefully resolved): gtk2_ardour/wscript libs/ardour/ardour/audioregion.h libs/ardour/ardour/debug.h libs/ardour/ardour/directory_names.h libs/ardour/ardour/filesystem_paths.h libs/ardour/ardour/session_event.h libs/gtkmm2ext/gtkmm2ext/utils.h libs/panners/1in2out/wscript libs/panners/2in2out/wscript libs/panners/vbap/wscript libs/pbd/pbd/debug.h libs/pbd/pbd/file_utils.h libs/pbd/pbd/pathexpand.h libs/pbd/pbd/ringbuffer.h libs/pbd/pbd/ringbufferNPT.h libs/pbd/pbd/search_path.h libs/pbd/pbd/stacktrace.h libs/pbd/pbd/uuid.h libs/pbd/pbd/uuid_boost.h libs/surfaces/control_protocol/control_protocol/basic_ui.h libs/surfaces/control_protocol/control_protocol/control_protocol.h
2013-10-17add -fvisibility=hidden to libpbd, and make things workPaul Davis
2013-09-06Rename SearchPath class SearchpathTim Mayberry
Windows headers define SearchPath which means we have to undefine it where necessary. This is a pain and can be tricksy, so I feel renaming the class slightly is the easiest solution.
2012-06-23Move file utility function into pbd/file_utils.h and into PBD namespaceTim Mayberry
git-svn-id: svn://localhost/ardour2/branches/3.0@12865 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23Move three file utility functions from pbd/filesystem.h to pbd/file_utils.hTim Mayberry
git-svn-id: svn://localhost/ardour2/branches/3.0@12863 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23Overwrite target file in PBD::copy_fileTim Mayberry
git-svn-id: svn://localhost/ardour2/branches/3.0@12854 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23Move PBD::sys::copy_file/s into pbd/file_utils.h and PBD:: namespaceTim Mayberry
Copy files no longer depends on PBD::sys::path so move it git-svn-id: svn://localhost/ardour2/branches/3.0@12853 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-06-23Use std::string instead of PBD::sys::path in pbd/search_path.h, ↵Tim Mayberry
pbd/file_utils.h and ardour/session_dir.h git-svn-id: svn://localhost/ardour2/branches/3.0@12829 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-05-12Remove most using declarations from header files.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5069 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02remove empty sigc++2 directoryDoug McLain
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-06-27Replace code for finding ControlProtocols/Surface plugins with a portable ↵Tim Mayberry
equivalent. Remove Session::control_protocol_path and the supporting non-portable Session::suffixed_search_path from Session. Add ARDOUR::control_protocol_search_path which is used in place of Session::control_protocol_path Replace ARDOUR::get_system_module_path with ARDOUR::system_module_directory which is used by ARDOUR::control_protocol_search_path Export ARDOUR_SURFACES_PATH in gtk2_ardour/ardev_common.sh which is returned by ARDOUR::control_protocol_search_path if defined. This means the control surfaces in the libs/surfaces/* directories can now be used without installing them. Add pbd/file_utils.h/cc containing functions for finding files matching a certain pattern Update documentation in SearchPath and add another constructor that takes a sys::path git-svn-id: svn://localhost/ardour2/trunk@2049 d708f5d6-7413-0410-9779-e7cbd77b26cf