file/directory.bi

Summary
file/directory.bi
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group
ext
DirectoryPerform filesystem operations in a platform independant manner.
dir
Functions
rootReturns a Directory object pointing to the root of the current filesystem.
rootPathReturns a string containing the path of the root of the current filesystem.
homeReturns a Directory object pointing to the current user’s home directory.
homePathReturns a string containing the path to the current user’s home directory.
tempReturns a Directory object pointing to the system’s temporary directory.
tempPathReturns a string containing the path to the system’s temporary directory.
toNativeSeperatorsConverts all seperators in the passed string to the seperators the current platform expects.
cleanPathRemoves all multiple directory separators

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group License.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext

Directory

Perform filesystem operations in a platform independant manner.

dir

Summary
Functions
rootReturns a Directory object pointing to the root of the current filesystem.
rootPathReturns a string containing the path of the root of the current filesystem.
homeReturns a Directory object pointing to the current user’s home directory.
homePathReturns a string containing the path to the current user’s home directory.
tempReturns a Directory object pointing to the system’s temporary directory.
tempPathReturns a string containing the path to the system’s temporary directory.
toNativeSeperatorsConverts all seperators in the passed string to the seperators the current platform expects.
cleanPathRemoves all multiple directory separators

Functions

root

declare function root () as Directory

Returns a Directory object pointing to the root of the current filesystem.  On Unix systems this is “/”, on DOS and Windows systems this is the root directory of the current drive.

rootPath

declare function rootPath () as string

Returns a string containing the path of the root of the current filesystem.  On Unix systems this is “/”, on DOS and Windows systems this is the root directory of the current drive.

home

declare function home () as Directory

Returns a Directory object pointing to the current user’s home directory.  On DOS systems this is equivalent to root.

homePath

declare function homePath () as string

Returns a string containing the path to the current user’s home directory.  On DOS systems this is equivalent to rootPath.

temp

declare function temp () as Directory

Returns a Directory object pointing to the system’s temporary directory.  On Unix systems this is usually “/var”.  On DOS and Windows 9x systems this is usually “C:\TEMP”.  The location varies on Windows NT systems but is set in the environment variable %TEMP%.

tempPath

declare function tempPath () as string

Returns a string containing the path to the system’s temporary directory.

toNativeSeperators

Converts all seperators in the passed string to the seperators the current platform expects.

Parameters

pathnstring containing the path with possibly different path seperators

Returns

String containing only seperators recognized by the current platform.

cleanPath

declare function cleanPath(byref pathn as const string) as string

Removes all multiple directory separators

declare function root () as Directory
Returns a Directory object pointing to the root of the current filesystem.
Perform filesystem operations in a platform independant manner.
declare function rootPath () as string
Returns a string containing the path of the root of the current filesystem.
declare function home () as Directory
Returns a Directory object pointing to the current user’s home directory.
declare function homePath () as string
Returns a string containing the path to the current user’s home directory.
declare function temp () as Directory
Returns a Directory object pointing to the system’s temporary directory.
declare function tempPath () as string
Returns a string containing the path to the system’s temporary directory.
declare function cleanPath(byref pathn as const string) as string
Removes all multiple directory separators