The method chflags() sets the flags of path to the numeric flags.
The flags may take a combination (bitwise OR) of the various values described below.
path -- This is complete path of the directory to be changed to a new location.
flags -- The flags specified are formed by OR'ing the following values:
#!/usr/bin/python import os path = "/tmp/foo.txt" # Set a flag so that file may not be renamed or deleted. flags = os.SF_NOUNLINK retval = os.chflags( path, flags) print "Return Value: %s" % retval
This method does not return any value.