A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://twistedmatrix.com/documents/8.1.0/api/twisted.python.filepath.FilePath.html below:

twisted.python.filepath.FilePath : API documentation

I am a path on the filesystem that only permits 'downwards' access.

Instantiate me with a pathname (for example, FilePath('/home/myuser/public_html')) and I will attempt to only provide access to files which reside inside that path. I may be a path to a file, a directory, or a file which does not exist.

The correct way to use me is to instantiate me, and then do ALL filesystem access through me. In other words, do not import the 'os' module; if you need to open a file, call my 'open' method. If you need to list a directory, call my 'path' method.

Even if you pass me a relative path, I will convert that to an absolute path internally.

Note: although time-related methods do return floating-point results, they may still be only second resolution depending on the platform and the last value passed to

os.stat_float_times

. If you want greater-than-second precision, call

os.stat_float_times(True)

, or use Python 2.5. Greater-than-second precision is only available in Windows on Python2.5 and later.

Instance Variables alwaysCreate When opening this file, only succeed if the file does not already exist. (type: bool )

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4