contents   index   previous   next



SElib.fullpath()

syntax:

SElib.fullpath(pathspec)

where:

pathspec - a partial path specification.

 

return:

string - the pathspec filled out to its full path specification or null if the path specification is invalid.

 

description:

Converts pathspec to a full and absolute path specification. The file name part of the path specification is not affected and may have wildcards. The drive and directory part of the path specification is converted or fleshed out to a full and absolute path.

 

The exact behavior of SElib.fullpath() depends on the underlying operating system. Some results can vary when using system specific path specifications.

 

see:

SElib.directory(), SElib.splitFilename(), File object in fileobj.jsh

 

example:

   // The following returns the full spec

   // of current dir

function CurDir()

{

   return SElib.fullpath(".")

}

   // The following returns the full spec

   // of a parent dir

function CurDir()

{

   return SElib.fullpath("..\")

}

   // The following works in DOS or OS/2

   // to test whether a drive

   // letter is valid

function ValidDrive(DriveLetter)

{

   Clib.sprintf(CurdirSpec, "%c:.", DriveLetter)

   return (null != SElib.fullpath(CurdirSpec) )

}

 


SElib.getObjectProperties()