Click or drag to resize
SbFileHelper Class

Utilities class for file management.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.HelpersSbFileHelper

Namespace: OIV.Inventor.Helpers
Assembly: OIV.Inventor.Base (in OIV.Inventor.Base.dll) Version: 2024.2.1.0 (10.16.1.0)
Syntax
public sealed class SbFileHelper : SoNetBase

The SbFileHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCleanUpPath

Removes all multiple occurences of '/' in the path.

Public methodStatic memberContainsWindowsDrive

Returns true if the specified path starts with a Microsoft Windows drive letter.

Public methodStatic memberCreateDirectory

Create the specified directory.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodStatic memberExpandString

Returns a new version of the string with "$NAME" SoPreference variable names expanded to their defined value.

Public methodStatic memberFileSystemURLToFilename

Converts a file system URL to a regular filename E.g "file:///c:/temp/test.dat" becomes "c:/temp/test.dat".

Public methodStatic memberGetBaseName

Returns the filename part of a full path string.

Public methodStatic memberGetCurrentDirectory

Returns the current directory.

Public methodStatic memberGetDirName

Returns the directory path part of a full path string.

Public methodStatic memberGetExtension

Returns the extension part of the specified filename.

Public methodStatic memberGetFileSize

Returns the size of the specified file in bytes.

Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodStatic memberGetTempDirectory

Returns the path to the temporary directory used by the system.

Public methodStatic memberGetTempFilename

Returns a temporary filename.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic memberIsAccessible(String)
Calls IsAccessible(filename, OIV.Inventor.Helpers.SbFileHelper.FileAccess( .SbFileHelper.READ )).
Public methodStatic memberIsAccessible(String, SbFileHelperFileAccess)

Returns true if a file is accessible

Public methodStatic memberIsFileSystemUrl

Returns true if the filename is a file system URL like: file://...

Public methodStatic memberIsUrl

Returns true if the filename is a network url like: http:// or ftp://.

Public methodStatic memberMakeFileSystemURL

Converts a filename to a file system URL.

Public methodStatic memberRemoveFile

Removes the specified file.

Public methodStatic memberSetCurrentDirectory

Sets the current working directory.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberToUnixPath

Converts a Microsoft Windows path (with '\') to a Unix path (with '/').

Public methodStatic memberToWindowsPath

Converts a Unix path (with '/') to a Microsoft Windows path (with '\').

Top
Remarks

Portable utility functions to manage files and manage file path strings.

File path strings can contain SoPreference (environment) variable names preceded by the '$' (dollar sign) character. These names are expanded to their defined value before passing the string to the operating system. For example, "$OIVHOME/data/models/bird.iv" could be used to access a file installed by the Open Inventor SDK. If the specified name does not have a defined value, the name is used as-is.

See Also