Difference between revisions of "TruxtonFileIO changetype"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "This changes the type of the file. It modifies the <code>FileTypeID</code> column of the <code> File</code> table. =Syntax= <syntaxhighlight lang="Python"> bo...")
 
Line 19: Line 19:
 
   file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")
 
   file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")
  
   file.changetype(10111)
+
   file.changetype(11000)
  
 
if __name__ == "__main__":
 
if __name__ == "__main__":
 
   main()
 
   main()
 
</syntaxhighlight>
 
</syntaxhighlight>

Revision as of 10:18, 15 June 2020

This changes the type of the file. It modifies the FileTypeID column of the File table.

Syntax

bool changetype(newtype);

Return value

True if the FileTypeID column of the File table was modified, False on failure.

Sample

import truxton

def main():
  t = truxton.create()
  file = t.getfileid("5ec2a123-74d6-5da7-0653-4e6800000000")

  file.changetype(11000)

if __name__ == "__main__":
  main()