3DCoat Python API
The 3DCoat Python API documentation.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
coat.resource Class Reference

Public Member Functions

 __init__ (self, id=str)
 
list listAllResourcesTypes ()
 list all available resources types
 
list listFolders (self)
 list folders of the resource type referred by this object
 
str currentFolder (self)
 get the current folder short name
 
str currentFolderFullPath (self)
 full path (relative to the 3DCoat's documents) to the current folder files
 
str rootPath (self)
 the root path (relative to the 3DCoat's documents) to the resource type referred by this object
 
list supportedExtensions (self)
 get the list of supported extensions for the resource type referred by this object
 
 setCurrentFolder (self, folder=str)
 set the current folder (short name without the full path)
 
 createFolder (self, folderName=str)
 create the folder and switch there
 
 removeFolder (self, folderName=str)
 remove the folder and switch to the root folder if this is the current folder
 
list listCurrentFolderItems (self)
 get the list of all items in the current folder
 
 addItem (self, itemPath=str)
 add the item to the current folder
 
 removeItem (self, itemName=str)
 remove the item from the current folder
 
 selectItem (self, itemName=str)
 select/activate the item in the current folder
 
 moveItemToFolder (self, itemName=str, destFolderName=str)
 move the item to another folder
 
str getCurrentItem (self)
 returns the current item name (if possible)
 

Constructor & Destructor Documentation

◆ __init__()

coat.resource.__init__ (   self,
  id = str 
)

Member Function Documentation

◆ addItem()

coat.resource.addItem (   self,
  itemPath = str 
)

add the item to the current folder

Parameters
itemPaththe path to the item (full or relative to the 3DCoat's documents)

◆ createFolder()

coat.resource.createFolder (   self,
  folderName = str 
)

create the folder and switch there

Parameters
folderNamethe folder name

◆ currentFolder()

str coat.resource.currentFolder (   self)

get the current folder short name

Returns
the name of current folder of the resource type referred by this object

◆ currentFolderFullPath()

str coat.resource.currentFolderFullPath (   self)

full path (relative to the 3DCoat's documents) to the current folder files

Returns
the path

◆ getCurrentItem()

str coat.resource.getCurrentItem (   self)

returns the current item name (if possible)

Returns
the string, current item name

◆ listAllResourcesTypes()

list coat.resource.listAllResourcesTypes ( )

list all available resources types

Returns
the list of resource types (any type may be passed to the resource constructor)

◆ listCurrentFolderItems()

list coat.resource.listCurrentFolderItems (   self)

get the list of all items in the current folder

Returns
the list of items (usually long names with the relative path)

◆ listFolders()

list coat.resource.listFolders (   self)

list folders of the resource type referred by this object

Returns
the list of folders (short names without the full path)

◆ moveItemToFolder()

coat.resource.moveItemToFolder (   self,
  itemName = str,
  destFolderName = str 
)

move the item to another folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()
destFolderNamethe short name of the destination folder

◆ removeFolder()

coat.resource.removeFolder (   self,
  folderName = str 
)

remove the folder and switch to the root folder if this is the current folder

Parameters
folderNamethe folder name

◆ removeItem()

coat.resource.removeItem (   self,
  itemName = str 
)

remove the item from the current folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()

◆ rootPath()

str coat.resource.rootPath (   self)

the root path (relative to the 3DCoat's documents) to the resource type referred by this object

Returns
the path

◆ selectItem()

coat.resource.selectItem (   self,
  itemName = str 
)

select/activate the item in the current folder

Parameters
itemNamethe item name as it is returned by listCurrentFolderItems()

◆ setCurrentFolder()

coat.resource.setCurrentFolder (   self,
  folder = str 
)

set the current folder (short name without the full path)

Parameters
folderthe folder name

◆ supportedExtensions()

list coat.resource.supportedExtensions (   self)

get the list of supported extensions for the resource type referred by this object

Returns
the list of strings with extensions

The documentation for this class was generated from the following file: