Home > functions > common > utility > vb_get_file_parts.m

vb_get_file_parts

PURPOSE ^

return path, name, extension, and version of file

SYNOPSIS ^

function [fpath, fname, fext] = vb_get_file_parts(file)

DESCRIPTION ^

 return path, name, extension, and version of file
 [usage]
   [path, name, ext] = vb_get_file_parts(file)
 [input]
    file : <optional> file name ['']
 [output]
   fpath : file path
   fname : file name
    fext : file extension
 [note]
   fileparts wrapping function
 [history]
   2007-06-18 (Sako) initial version
   2010-10-08 (rhayashi) removed 4th argument(fver)

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [fpath, fname, fext] = vb_get_file_parts(file)
0002 % return path, name, extension, and version of file
0003 % [usage]
0004 %   [path, name, ext] = vb_get_file_parts(file)
0005 % [input]
0006 %    file : <optional> file name ['']
0007 % [output]
0008 %   fpath : file path
0009 %   fname : file name
0010 %    fext : file extension
0011 % [note]
0012 %   fileparts wrapping function
0013 % [history]
0014 %   2007-06-18 (Sako) initial version
0015 %   2010-10-08 (rhayashi) removed 4th argument(fver)
0016 %
0017 % Copyright (C) 2011, ATR All Rights Reserved.
0018 % License : New BSD License(see VBMEG_LICENSE.txt)
0019 
0020 % --- CHECK ARGUMENTS --- %
0021 if ~exist('file', 'var') || length(file) == 0
0022   % set empty string
0023   file = '';
0024 end
0025 
0026 [fpath, fname, fext] = fileparts(file);
0027 return;
0028 
0029 %%% END OF FILE %%%

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005