Difference between revisions of "TruxtonFileIO changetype"
Jump to navigation
Jump to search
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
This changes the type of the file. | This changes the type of the file. | ||
| − | It modifies the <code>FileTypeID</code> column of the <code>[[File Table|File]]</code> table. | + | It modifies the <code>[FileTypeID]</code> column of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table. |
=Syntax= | =Syntax= | ||
| Line 8: | Line 8: | ||
=Return value= | =Return value= | ||
| − | [https://docs.python.org/3.10/library/constants.html?highlight=false#True True] if the <code>FileTypeID</code> column of the <code>[[File Table|File]]</code> table was modified, [https://docs.python.org/3.10/library/constants.html?highlight=false#False False] on failure. | + | [https://docs.python.org/3.10/library/constants.html?highlight=false#True True] if the <code>[FileTypeID]</code> column of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table was modified, [https://docs.python.org/3.10/library/constants.html?highlight=false#False False] on failure. |
=Sample= | =Sample= | ||
| − | < | + | <source lang="Python" highlight="7"> |
import truxton | import truxton | ||
| Line 23: | Line 23: | ||
if __name__ == "__main__": | if __name__ == "__main__": | ||
| − | main() | + | sys.exit(main()) |
</source> | </source> | ||
Latest revision as of 08:57, 3 February 2024
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)
return None
if __name__ == "__main__":
sys.exit(main())