webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
webkitpy.common.system.filesystem_mock.MockFileSystem Class Reference
Inheritance diagram for webkitpy.common.system.filesystem_mock.MockFileSystem:

Public Member Functions

def __init__ (self, files=None, dirs=None, cwd='/')
 
def clear_written_files (self)
 
def abspath (self, path)
 
def realpath (self, path)
 
def basename (self, path)
 
def expanduser (self, path)
 
def path_to_module (self, module_name)
 
def chdir (self, path)
 
def copyfile (self, source, destination)
 
def dirname (self, path)
 
def exists (self, path)
 
def dirs_under (self, path, dirs_filter=None)
 
def files_under (self, path, dirs_to_skip=[], file_filter=None)
 
def getcwd (self)
 
def getsize (self, path)
 
def glob (self, glob_string)
 
def isabs (self, path)
 
def isfile (self, path)
 
def isdir (self, path)
 
def join (self, comps)
 
def listdir (self, path)
 
def mtime (self, path)
 
def mkdtemp (self, kwargs)
 
def maybe_make_directory (self, path)
 
def move (self, source, destination)
 
def normpath (self, path)
 
def open_binary_tempfile (self, suffix='')
 
def open_binary_file_for_reading (self, path)
 
def read_binary_file (self, path)
 
def write_binary_file (self, path, contents)
 
def open_text_file_for_reading (self, path)
 
def open_text_file_for_writing (self, path, should_append=False)
 
def read_text_file (self, path)
 
def write_text_file (self, path, contents)
 
def sha1 (self, path)
 
def relpath (self, path, start='.')
 
def remove (self, path)
 
def rmtree (self, path)
 
def copytree (self, source, destination)
 
def split (self, path)
 
def splitext (self, path)
 
def compare (self, path1, path2)
 

Public Attributes

 files
 
 written_files
 
 last_tmpdir
 
 current_tmpno
 
 cwd
 
 dirs
 

Static Public Attributes

string sep = '/'
 
string pardir = '..'
 

Constructor & Destructor Documentation

◆ __init__()

def webkitpy.common.system.filesystem_mock.MockFileSystem.__init__ (   self,
  files = None,
  dirs = None,
  cwd = '/' 
)
Initializes a "mock" filesystem that can be used to completely
stub out a filesystem.

Args:
    files: a dict of filenames -> file contents. A file contents
value of None is used to indicate that the file should
not exist.

Member Function Documentation

◆ abspath()

def webkitpy.common.system.filesystem_mock.MockFileSystem.abspath (   self,
  path 
)

◆ basename()

def webkitpy.common.system.filesystem_mock.MockFileSystem.basename (   self,
  path 
)

◆ chdir()

def webkitpy.common.system.filesystem_mock.MockFileSystem.chdir (   self,
  path 
)

◆ clear_written_files()

def webkitpy.common.system.filesystem_mock.MockFileSystem.clear_written_files (   self)

◆ compare()

def webkitpy.common.system.filesystem_mock.MockFileSystem.compare (   self,
  path1,
  path2 
)

◆ copyfile()

def webkitpy.common.system.filesystem_mock.MockFileSystem.copyfile (   self,
  source,
  destination 
)

◆ copytree()

def webkitpy.common.system.filesystem_mock.MockFileSystem.copytree (   self,
  source,
  destination 
)

◆ dirname()

def webkitpy.common.system.filesystem_mock.MockFileSystem.dirname (   self,
  path 
)

◆ dirs_under()

def webkitpy.common.system.filesystem_mock.MockFileSystem.dirs_under (   self,
  path,
  dirs_filter = None 
)

◆ exists()

def webkitpy.common.system.filesystem_mock.MockFileSystem.exists (   self,
  path 
)

◆ expanduser()

def webkitpy.common.system.filesystem_mock.MockFileSystem.expanduser (   self,
  path 
)

◆ files_under()

def webkitpy.common.system.filesystem_mock.MockFileSystem.files_under (   self,
  path,
  dirs_to_skip = [],
  file_filter = None 
)

◆ getcwd()

def webkitpy.common.system.filesystem_mock.MockFileSystem.getcwd (   self)

◆ getsize()

def webkitpy.common.system.filesystem_mock.MockFileSystem.getsize (   self,
  path 
)

◆ glob()

def webkitpy.common.system.filesystem_mock.MockFileSystem.glob (   self,
  glob_string 
)

◆ isabs()

def webkitpy.common.system.filesystem_mock.MockFileSystem.isabs (   self,
  path 
)

◆ isdir()

def webkitpy.common.system.filesystem_mock.MockFileSystem.isdir (   self,
  path 
)

◆ isfile()

def webkitpy.common.system.filesystem_mock.MockFileSystem.isfile (   self,
  path 
)

◆ join()

def webkitpy.common.system.filesystem_mock.MockFileSystem.join (   self,
  comps 
)

◆ listdir()

def webkitpy.common.system.filesystem_mock.MockFileSystem.listdir (   self,
  path 
)

◆ maybe_make_directory()

def webkitpy.common.system.filesystem_mock.MockFileSystem.maybe_make_directory (   self,
  path 
)

◆ mkdtemp()

def webkitpy.common.system.filesystem_mock.MockFileSystem.mkdtemp (   self,
  kwargs 
)

◆ move()

def webkitpy.common.system.filesystem_mock.MockFileSystem.move (   self,
  source,
  destination 
)

◆ mtime()

def webkitpy.common.system.filesystem_mock.MockFileSystem.mtime (   self,
  path 
)

◆ normpath()

def webkitpy.common.system.filesystem_mock.MockFileSystem.normpath (   self,
  path 
)

◆ open_binary_file_for_reading()

def webkitpy.common.system.filesystem_mock.MockFileSystem.open_binary_file_for_reading (   self,
  path 
)

◆ open_binary_tempfile()

def webkitpy.common.system.filesystem_mock.MockFileSystem.open_binary_tempfile (   self,
  suffix = '' 
)

◆ open_text_file_for_reading()

def webkitpy.common.system.filesystem_mock.MockFileSystem.open_text_file_for_reading (   self,
  path 
)

◆ open_text_file_for_writing()

def webkitpy.common.system.filesystem_mock.MockFileSystem.open_text_file_for_writing (   self,
  path,
  should_append = False 
)

◆ path_to_module()

def webkitpy.common.system.filesystem_mock.MockFileSystem.path_to_module (   self,
  module_name 
)

◆ read_binary_file()

def webkitpy.common.system.filesystem_mock.MockFileSystem.read_binary_file (   self,
  path 
)

◆ read_text_file()

def webkitpy.common.system.filesystem_mock.MockFileSystem.read_text_file (   self,
  path 
)

◆ realpath()

def webkitpy.common.system.filesystem_mock.MockFileSystem.realpath (   self,
  path 
)

◆ relpath()

def webkitpy.common.system.filesystem_mock.MockFileSystem.relpath (   self,
  path,
  start = '.' 
)

◆ remove()

def webkitpy.common.system.filesystem_mock.MockFileSystem.remove (   self,
  path 
)

◆ rmtree()

def webkitpy.common.system.filesystem_mock.MockFileSystem.rmtree (   self,
  path 
)

◆ sha1()

def webkitpy.common.system.filesystem_mock.MockFileSystem.sha1 (   self,
  path 
)

◆ split()

def webkitpy.common.system.filesystem_mock.MockFileSystem.split (   self,
  path 
)

◆ splitext()

def webkitpy.common.system.filesystem_mock.MockFileSystem.splitext (   self,
  path 
)

◆ write_binary_file()

def webkitpy.common.system.filesystem_mock.MockFileSystem.write_binary_file (   self,
  path,
  contents 
)

◆ write_text_file()

def webkitpy.common.system.filesystem_mock.MockFileSystem.write_text_file (   self,
  path,
  contents 
)

Member Data Documentation

◆ current_tmpno

webkitpy.common.system.filesystem_mock.MockFileSystem.current_tmpno

◆ cwd

webkitpy.common.system.filesystem_mock.MockFileSystem.cwd

◆ dirs

webkitpy.common.system.filesystem_mock.MockFileSystem.dirs

◆ files

webkitpy.common.system.filesystem_mock.MockFileSystem.files

◆ last_tmpdir

webkitpy.common.system.filesystem_mock.MockFileSystem.last_tmpdir

◆ pardir

string webkitpy.common.system.filesystem_mock.MockFileSystem.pardir = '..'
static

◆ sep

string webkitpy.common.system.filesystem_mock.MockFileSystem.sep = '/'
static

◆ written_files

webkitpy.common.system.filesystem_mock.MockFileSystem.written_files

The documentation for this class was generated from the following file: