func_file_setfilemode.rst 648 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. .. _func_file_setfilemode:
  2. ===========
  3. SetFileMode
  4. ===========
  5. SetFileMode -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. SetFileMode( path$,mode )
  10. Set file mode
  11. Parameters
  12. ==========
  13. Return Values
  14. =============
  15. Nothing.
  16. Examples
  17. ========
  18. .. code-block:: blitzmax
  19. ' setfilemode.bmx
  20. ' the following makes this source file readonly
  21. writebits=%010010010
  22. ' read the file mode
  23. mode=filemode("setfilemode.bmx")
  24. 'mask out the write bits to make readonly
  25. mode=mode & ~writebits
  26. 'set the new file mode
  27. setfilemode("setfilemode.bmx",mode)
  28. See Also
  29. ========