User Tools

Site Tools


DzContentFile

Represents a file in the content library.

More...

Inherits :

Properties

Methods

DAZ Script
BooleandeleteFile ()
DzContentFoldergetFolder ()
DzContentFilegetNext ()
voidreloadIcon ()
Booleanrename ( String newName )

Detailed Description

Represents a file in the content library that can be loaded/imported. Also provides functionality for moving the file to a new location, renaming the file, and deleting the file from the library.

See Also:

Properties


Boolean : canDelete

Holds whether or not the file can be deleted. (Read Only)


Boolean : canRename

Holds whether or not the file can be renamed. (Read Only)


Boolean : companionIsScript

Holds whether or not a companion file is a script file. (Read Only)


String : companionPath

Holds the path of the companion script for non-native files. (Read Only)


String : fullPath

Holds the full path of the file. (Read Only)


Boolean : hasCompanion

Holds whether or not a non-native file has a native companion file. (Read Only)


Boolean : hasCompanionScript

Holds whether or not a non-native file has a companion script file. (Read Only)


Boolean : isNative

Holds whether or not the file is a native content file . (Read Only)


Boolean : isScript

Holds whether or not the file is a script file . (Read Only)


String : label

Holds the label of the file, as displayed to the user. (Read Only)


String : name

Holds the name of the file. (Read Only)


Pixmap : thumbnailPixmap

Holds the thumbnail for this file. (Read Only)

Since:

  • 4.21.1.44

Pixmap : thumbnailSmallPixmap

Holds the small thumbnail for this file. (Read Only)

Since:

  • 4.21.1.44

Pixmap : icon

Deprecated

Exists only to keep old code working. Do not use in new code. Use thumbnailPixmap instead.


Pixmap : smallIcon

Deprecated

Exists only to keep old code working. Do not use in new code. Use thumbnailSmallPixmap instead.

Methods


Boolean : deleteFile()

Removes this file from its content folder. The default implementation of this function deletes the content file and any associated thumbnail image from the disk, so use with care!

Return Value:

  • true if the file was removed successfully, otherwise false.

DzContentFolder : getFolder()

Return Value:

  • The current parent folder of this file.

DzContentFile : getNext()

Return Value:

  • The next sibling of this file.

void : reloadIcon()

Force the file to reload its icon.


Boolean : rename( String newName )

Rename the file to the given name.

Parameter(s):

  • name - The new name for the file.

Return Value:

  • true if the file was successfully renamed, otherwise false.