13
0
Commit Graph

11 Commits

Author SHA1 Message Date
6fccd83fac If sys::copy_file fails, try and remove the target file before throwing an exception
git-svn-id: svn://localhost/ardour2/trunk@2435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-09 10:05:16 +00:00
99ecfb4096 Add function sys::rename to pbd/filesystem.h/cc. Renames a file, uses g_rename.
git-svn-id: svn://localhost/ardour2/trunk@2431 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-09 10:04:54 +00:00
bb5314c364 Use path::leaf in sys::basename and sys::extension
git-svn-id: svn://localhost/ardour2/trunk@2407 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04 09:01:21 +00:00
414dd87040 Add path::leaf method function to the PBD::sys::path class
git-svn-id: svn://localhost/ardour2/trunk@2406 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04 09:01:19 +00:00
8b160ef500 Add PBD::sys::extension for getting the filename extension of a file
git-svn-id: svn://localhost/ardour2/trunk@2405 d708f5d6-7413-0410-9779-e7cbd77b26cf
2007-09-04 09:01:17 +00:00
4cf84efe88 Modify PBD::sys::basename to match boost::filesystem behaviour and document it.
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-04 09:01:15 +00:00
26c4c12fb7 Add path::branch_path to the PBD::sys::path class
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-04 09:01:12 +00:00
e3364b72cc Add function PBD::sys::copy_file intended to replace PBD::copy_file
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-04 04:48:13 +00:00
29842063e3 Add function PBD::sys::remove as a wrapper to g_unlink
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-09-04 04:48:04 +00:00
b99c6c6e1d When loading sessions, create any missing session directories rather than 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-19 11:31:27 +00:00
04c1ce1960 Add PBD::sys::path class that has a similar API to boost::filesystem::path 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
2007-05-18 02:46:12 +00:00