1/*****************************************************************************
    2 * This file is part of the Prolog Development Tool (PDT)
    3 * 
    4 * Author: Tobias Rho, Lukas Degener, Andreas Becker, Fabian Noth
    5 * WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
    6 * Mail: pdt@lists.iai.uni-bonn.de
    7 * Copyright (C): 2004-2012, CS Dept. III, University of Bonn
    8 * 
    9 * All rights reserved. This program is  made available under the terms
   10 * of the Eclipse Public License v1.0 which accompanies this distribution,
   11 * and is available at http://www.eclipse.org/legal/epl-v10.html
   12 * 
   13 ****************************************************************************/
   14
   15:- module( split_file_path,
   16      [ split_file_path/5      % (+FullPath, ?Directory, ?FileName,?BaseName,?Extension)
   17      ]).
 split_file_path(+FullPath, ?Directory, ?FileName, ?BaseName, ?Extension) is det
   22split_file_path(FullPath, Directory, FileName,BaseName,Extension):-
   23    file_directory_name(FullPath, Directory0),           % SWI-Prolog
   24    atom_concat(Directory0,'/',Directory),               % SWI-Prolog
   25    file_base_name(FullPath,FileName),                   % SWI-Prolog
   26    file_name_extension(BaseName,Extension,FileName).    % SWI-Prolog