Difference between revisions of "VFSFile Class"

From TouchDesigner Documentation
Jump to: navigation, search
(Created page with "{{TDClassSummary |label=VFSFile |summary=The VFSFile Class describes a virtual file contained within a virtual file system. |inherit= |parent=}} <section begin=HELPBODY />...")
 
m
 
Line 7: Line 7:
 
{{ClassMemberSection
 
{{ClassMemberSection
 
|Sectionsummary=
 
|Sectionsummary=
|items={{ClassMember
+
|items=
 +
{{ClassMember
 
|class=VFSFile
 
|class=VFSFile
|name=byteArray
+
|name=name
|type=bytearray
+
|type=str
 
|set=1
 
|set=1
|text=Get or set the file data as a bytearray.}}
+
|text=Get or set the name of the file. This name can include slashes but should not include leading slashes.}}
 +
{{ClassMember
 +
|class=VFSFile
 +
|name=size
 +
|type=int
 +
|set=0
 +
|text=Get the size of the file data.}}
 
{{ClassMember
 
{{ClassMember
 
|class=VFSFile
 
|class=VFSFile
Line 21: Line 28:
 
{{ClassMember
 
{{ClassMember
 
|class=VFSFile
 
|class=VFSFile
|name=name
+
|name=virtualPath
 
|type=str
 
|type=str
|set=1
+
|set=0
|text=Get or set the name of the file. This name can include slashes but should not include leading slashes.}}
+
|text=Get the virtual path of the file. Returns a String formatted for fetching the file data from VFS in operators such as the Movie File In TOP. Format is <code>vfs:owner:name</code>.}}
 
{{ClassMember
 
{{ClassMember
 
|class=VFSFile
 
|class=VFSFile
Line 39: Line 46:
 
{{ClassMember
 
{{ClassMember
 
|class=VFSFile
 
|class=VFSFile
|name=size
+
|name=byteArray
|type=int
+
|type=bytearray
|set=0
+
|set=1
|text=Get the size of the file data.}}
+
|text=Get or set the file data as a bytearray.}}
{{ClassMember
 
|class=VFSFile
 
|name=virtualPath
 
|type=str
 
|set=0
 
|text=Get the virtual path of the file. Returns a String formatted for fetching the file data from VFS in operators such as the Movie File In TOP. Format is <code>vfs:owner:name</code>.}}
 
 
|empty=}}
 
|empty=}}
 
{{ClassMethodSection
 
{{ClassMethodSection

Latest revision as of 22:59, 9 May 2020

The VFSFile Class describes a virtual file contained within a virtual file system.


Members[edit]

namestr :

Get or set the name of the file. This name can include slashes but should not include leading slashes.

sizeint (Read Only):

Get the size of the file data.

datedatetime (Read Only):

Get the modified date of the file in the form of a datetime Python object.

virtualPathstr (Read Only):

Get the virtual path of the file. Returns a String formatted for fetching the file data from VFS in operators such as the Movie File In TOP. Format is vfs:owner:name.

originalFilePathstr (Read Only):

Get the original file path on disk. If the VFSFile was created from a bytearray and not a file on disk then this will be empty.

ownerOP (Read Only):

Get the OP owner.

byteArraybytearray :

Get or set the file data as a bytearray.

Methods[edit]

destroy()None:

Destroys the file in VFS referenced by this object.

export(folder)str:

Exports the file to the specified folder on disk and returns the location.

  • folder - The folder on disk to export the file to.


Lets you embed files inside a .tox or .toe file. Operators like the Movie File In TOP that read regular files can also read the embedded VFS files using a vfs: syntax.

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.