idllib

Personal IDL library for M. Galloy

single page | use frames     summary     class     fields     routine details     file attributes

fileio/

mgfffilename__define.pro


This class represents a filename (or directory name).

This class corrects many of the errors found in FILEPATH, FILE_DIRNAME, and FILE_BASENAME.

Class description for mgfffilename

Properties

directories get

array of directories as listed in dirname

basename get

characters after the last path separator in the filename; the entire filename if no path separator

dirname get

characters before the last path separator in the filename; empty if no path separator

extension get set

characters after the last dot in the basename

_ref_extra init

Routines

mgfffilename::getProperty, extension=extension, basename=basename, dirname=dirname, directories=directories

Get properties.

mgfffilename::setProperty, extension=extension

Set properties.

mgfffilename::compose [, basename] [, /clock_basename] [, subdirectory=string/strarr] [, /tmp] [, root_dir=string]

Create a filename by specifying its parts.

result = mgfffilename::toString( [format=string])

Returns the filename as a string.

mgfffilename::cleanup

Free resources.

result = mgfffilename::init( [basename] [, _ref_extra=keywords])

Create a filename object.

mgfffilename__define

Define instance variables.

Routine details

top source mgfffilename::getProperty

mgfffilename::getProperty, extension=extension, basename=basename, dirname=dirname, directories=directories

Get properties.

Keywords

extension

characters after the last dot in the basename

basename

characters after the last path separator in the filename; the entire filename if no path separator

dirname

characters before the last path separator in the filename; empty if no path separator

directories

array of directories as listed in dirname

top source mgfffilename::setProperty

mgfffilename::setProperty, extension=extension

Set properties.

Keywords

extension

characters after the last dot in the basename

top source mgfffilename::compose

mgfffilename::compose [, basename] [, /clock_basename] [, subdirectory=string/strarr] [, /tmp] [, root_dir=string]

Create a filename by specifying its parts. Parts are assumed to be empty if not specified (unlike FILEPATH).

Parameters

basename in optional type=string

basename or full filename of filename

Keywords

clock_basename in optional type=boolean

set to use basename as a C-style format string to insert the number of milliseconds since 1 January 1970 into

subdirectory in optional type=string/strarr

subdirectory or subdirectories

tmp in optional type=boolean

set to ignore ROOT_DIR keyword and use a root directory specially designated for temporary files

root_dir in optional type=string

root directory

top source mgfffilename::toString

result = mgfffilename::toString( [format=string])

Returns the filename as a string.

Return value

string

Keywords

format in optional type=string

format string with a single string specifier in it (%s or A, depending on the format type) in it

top source mgfffilename::cleanup

mgfffilename::cleanup

Free resources.

top source mgfffilename::init

result = mgfffilename::init( [basename] [, _ref_extra=keywords])

Create a filename object.

Parameters

basename in optional type=string

basename or full filename of the new filename object

Keywords

_ref_extra in out optional type=keywords

input keywords to ::compose and output keywords to ::getProperty

top source mgfffilename__define

mgfffilename__define

Define instance variables.

File attributes

Modification date: Mon Nov 29 18:32:29 2010
Lines: 187
Docformat: rst rst
Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.