[SESI logo]

Houdini Development Toolkit - Version 6.5

Side Effects Software Inc. 2004

File Access Classes

FS_Info Class

The FS_Info class takes a file name in its constructor, and lets you gather information about the specified file. The information you can retrieve is not as extensive as using the stat C library function. The advantage of using this class is that FS_Info supports an extensible architecture for accessing file information from sources other than on disk. For example, if the given file name begins with "http:", the FS_Info will retrieve the file from a web server. If the file name begins with "opdef:" or "oplib:", and your code is running from within Houdini, the FS_Info will access a file embbedded in the operator type library or operator definition speficied by the file name.

Accessing the File Information

  • FS_Info(const char *filename)
    Use this constructor to create a new info object. The specified file is not actually opened or accessed until one of the information gathering methods is called.
  • bool hasAccess(int mode = 0) const
    This function returns whether or not the current user has rights to access the file in the given mode. The mode parameter can be any of FS_READ, FS_WRITE, or FS_EXECUTE. You can also or these values together to check multiple access types simultaneously. If the mode value is 0, the function returns true if the file exists.
  • int getModTime() const
    Returns the modification time of the file. The returned value can be cast directly to a time_t value, as defined in the standard C library.
  • int getContents(UT_StringArray &contents)
    If the source specified in the constructor is a directory rather than an individual file, this method will return a listing of all files and directories contained in that directory.

  • Table of Contents
    Operators | Surface Operations | Particle Operations | Composite Operators | Channel Operators
    Material & Texture | Objects | Command and Expression | Render Output |
    Mantra Shaders | Utility Classes | Geometry Library | Image Library | Clip Library
    Customizing UI | Questions & Answers

    Copyright © 2004 Side Effects Software Inc.
    477 Richmond Street West, Toronto, Ontario, Canada M5V 3E7