summaryrefslogtreecommitdiff
path: root/libs/pbd/filesystem.cc
AgeCommit message (Collapse)Author
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-09-09If sys::copy_file fails, try and remove the target file before throwing an ↵Tim Mayberry
exception git-svn-id: svn://localhost/ardour2/trunk@2435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-09Add function sys::rename to pbd/filesystem.h/cc. Renames a file, uses g_rename.Tim Mayberry
git-svn-id: svn://localhost/ardour2/trunk@2431 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Use path::leaf in sys::basename and sys::extensionTim Mayberry
git-svn-id: svn://localhost/ardour2/trunk@2407 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Add path::leaf method function to the PBD::sys::path classTim Mayberry
git-svn-id: svn://localhost/ardour2/trunk@2406 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Add PBD::sys::extension for getting the filename extension of a fileTim Mayberry
git-svn-id: svn://localhost/ardour2/trunk@2405 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Modify PBD::sys::basename to match boost::filesystem behaviour and document it.Tim Mayberry
This makes this function equivalent to PBD::basename_nosuffix, sys::basename takes a path as an argument rather than a string but that is ok as a path can automatically constructed from a string. git-svn-id: svn://localhost/ardour2/trunk@2404 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Add path::branch_path to the PBD::sys::path classTim Mayberry
This is basically equivalent to Glib::path_get_dirname but returning an empty string(path) if a path doesn't contain any directory components rather than "." git-svn-id: svn://localhost/ardour2/trunk@2403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Add function PBD::sys::copy_file intended to replace PBD::copy_fileTim Mayberry
Basically moving PBD::copy_file implementation to pbd/filesystem.h/cc. The implementation itself looks like it could be improved to use much less memory when copying big files by reading and writing in chunks but I don't think that is an issue at present. git-svn-id: svn://localhost/ardour2/trunk@2376 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04Add function PBD::sys::remove as a wrapper to g_unlinkTim Mayberry
API is intended to be indentical(apart from the string type) to boost::filesystem::remove git-svn-id: svn://localhost/ardour2/trunk@2372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-05-19When loading sessions, create any missing session directories rather than ↵Tim Mayberry
throwing an exception. Change the meaning of the return value of SessionDirectory::create and add documentation to explain usage. Add PBD::sys::filesystem_error to indicate a filesystem error and throw it where necessary. Change the semantics of PBD::sys::create_directory/ies functions to match boost::filesystem git-svn-id: svn://localhost/ardour2/trunk@1884 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-05-18Add PBD::sys::path class that has a similar API to boost::filesystem::path ↵Tim Mayberry
but using glib/mm filesystem utility functions Add ARDOUR::SessionDirectory class Use SessionDirectory to create the session directory structure when creating a new session git-svn-id: svn://localhost/ardour2/trunk@1874 d708f5d6-7413-0410-9779-e7cbd77b26cf