pdf-tasks
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pdf-tasks] [flyspray] New FS module function: pdf_fsys_build_path()


From: GNU PDF Library
Subject: [pdf-tasks] [flyspray] New FS module function: pdf_fsys_build_path()
Date: Sun, 18 Apr 2010 12:46:36 +0200

THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened. Details are below. User who did this - Aleksander Morgado (aleksander)
Attached to Project - GNU PDF Library
Summary - New FS module function: pdf_fsys_build_path()
Task Type - Sporadic Task
Category - Filesystem Module
Status - NEXT
Assigned To - Operating System - All
Severity - Low
Priority - Low
Reported Version - START
Due in Version - BASE-LAYER-0
Due Date - Undecided
Details - The idea is to have a method equivalent to GLib's g_build_filename()
http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-build-filename

When working with the FS interface, sometimes you may want to build local paths, for 
example after getting the list of files in a given directory, if you want to have the whole 
path of each children you need to concatenate <directory> + <dir-separator> + 
filename. As the dir-separator character depends on the OS in the disk-FS module, it makes 
sense to put the new method in the FS interface.

The API of the new method (with a variable number of arguments) could then be:
pdf_status_t
pdf_fsys_build_path (pdf_text_t *output, pdf_text_t first_element, ...);

If PDF_OK returned, `output' will be a newly allocated pdf_text_t object with 
the proper concatenations.

Example:
pdf_text_t full_path = NULL;
pdf_text_t filename = NULL;
pdf_text_t parent_path = get_current_dir_as_text (); /* example */

pdf_text_new_from_from_unicode ("filename.txt",
                               strlen ("filename.txt"),
                               PDF_TEXT_UTF8,
                               &filename);

pdf_fsys_build_path (&full_path,
                    parent_dir,
                    filename);

More information can be found at the following URL:
http://www.gnupdf.org/flyspray/index.php?do=details&task_id=118

You are receiving this message because you have requested it from the Flyspray 
bugtracking system.  If you did not expect this message or don't want to 
receive mails in future, you can change your notification settings at the URL 
shown above.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]