telemetry.internal.util.file_handle | index telemetry/internal/util/file_handle.py

`# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |

os |  |  |

Classes
`` |  |

__builtin__.object
  FileHandle

class FileHandle(__builtin__.object)
`` |  | Methods defined here:

GetAbsPath(self)
  `Returns the path to the pointed-to file relative to the given start path.
  Args:
  start: A string representing a starting path.
  Returns:
  A string giving the relative path from path to this file.`

__init__(self, temp_file=None, absolute_path=None)
  `Constructs a FileHandle object.
  This constructor should not be used by the user; rather it is preferred to
  use the module-level GetAbsPath and FromTempFile functions.
  Args:
  temp_file: An instance of a temporary file object.
  absolute_path: A path; should not be passed if tempfile is and vice-versa.
  extension: A string that specifies the file extension. It must starts with
  ".".`

Data descriptors defined here:

__dict__
  `dictionary for instance variables (if defined)`

__weakref__
  `list of weak references to the object (if defined)`

extension

id

Functions
`` |  |

FromFilePath(path)
  `Constructs a FileHandle from an absolute file path.
  Args:
  path: A string giving the absolute path to a file.
  Returns:
  A FileHandle referring to the file at the specified path.`

FromTempFile(temp_file)
  `Constructs a FileHandle pointing to a temporary file.
  Returns:
  A FileHandle referring to a named temporary file.`