native_client_sdk/src/tools/create_nmf.py
def DirectoryTreeContainsFile(dirname, filename):
  """Returns True if a file is in a directory, or any of that directory's
  subdirectories recursively.

  e.g.
  DirectoryTreeContainsFile("foo", "foo/quux.txt") => True
  DirectoryTreeContainsFile("foo", "foo/bar/baz/blah.txt") => True
  DirectoryTreeContainsFile("foo", "bar/blah.txt") => False
  """
  real_dirname = os.path.realpath(dirname)
  real_filename = os.path.realpath(filename)
  return real_filename.startswith(real_dirname)
Returns True if a file is in a directory, or any of that directory's
  subdirectories recursively.

  e.g.
  DirectoryTreeContainsFile("foo", "foo/quux.txt") => True
  DirectoryTreeContainsFile("foo", "foo/bar/baz/blah.txt") => True
  DirectoryTreeContainsFile("foo", "bar/blah.txt") => False
  
Returns True if a file is in a directory, or any of that directory's
subdirectories recursively.


Returns True if a file is in a directory or any of that directory ' s subdirectories recursively .
def DirectoryTreeContainsFile(dirname, filename):
  real_dirname = os.path.realpath(dirname)
  real_filename = os.path.realpath(filename)
  return real_filename.startswith(real_dirname)
def DirectoryTreeContainsFile ( dirname , filename ) : real_dirname = os . path . realpath ( dirname ) real_filename = os . path . realpath ( filename ) return real_filename . startswith ( real_dirname )
Returns True if a file is in a directory, or any of that directory's
subdirectories recursively.
Returns True if a file is in a directory or any of that directory ' s subdirectories recursively .
"""Returns True if a file is in a directory, or any of that directory's
  subdirectories recursively.

  e.g.
  DirectoryTreeContainsFile("foo", "foo/quux.txt") => True
  DirectoryTreeContainsFile("foo", "foo/bar/baz/blah.txt") => True
  DirectoryTreeContainsFile("foo", "bar/blah.txt") => False
  """
dirname
filename