Returns the same list of code blocks as what is passed in, but each filename includes the directory where it is stored.
338532
function writeAndRunCodeBlocks(codeBlocks) {
  var dir = '.runnable-markdown-' + rand.generateKey(7);
  return makeTempDir(dir)
  .then(function() {
    return new Promise(function(fulfill, reject) {
      async.mapSeries(codeBlocks, function(codeBlock, callback) {
        appendCodeBlockToFile(codeBlock, dir)
          .then(runCodeBlock)
          .then(function(codeBlock) {
            callback(null, codeBlock);
          })
          .catch(function(err) {
            callback(err, null);
          });
      }, convertAsyncResultToPromise(fulfill, reject));
    });
  })
  .then(function(codeBlocks) {
    return removeOldDir(dir)
      .then(function() {
        return codeBlocks;
      });
  });
}
535219
def get_files():
    
    sources = []
    headers = ["datatable/include/datatable.h"]
    assert os.path.isfile(headers[0])
    for dirpath, _, filenames in os.walk("c"):
        for f in filenames:
            fullname = os.path.join(dirpath, f)
            if f.endswith(".h") or f.endswith(".inc"):
                headers.append(fullname)
            elif f.endswith(".c") or f.endswith(".cc"):
                sources.append(fullname)
    return (sources, headers)
127776
def generate_search_space(code_dir):
    
    search_space = {}
    
    if code_dir.endswith(slash):
        code_dir = code_dir[:-1]

    for subdir, _, files in os.walk(code_dir):
        # generate module name from path
        if subdir == code_dir:
            package = ''
        else:
            assert subdir.startswith(code_dir + slash), subdir
            prefix_len = len(code_dir) + 1
            package = subdir[prefix_len:].replace(slash, '.') + '.'

        for file_name in files:
            if file_name.endswith('.py'):
                path = os.path.join(subdir, file_name)
                module = package + file_name[:-3]
                search_space.update(_generate_file_search_space(path, module))

    return search_space
838251
public String[] getHardLinkedFiles(String src) throws IOException {
    byte[][] components = INode.getPathComponents(src);
    List<byte [][]> results = null;
    readLock();
    try {
      INodeFile inode = getFileINode(components);
      if (!exists(inode)) {
        throw new IOException(src + " does not exist");
      }
      if (inode instanceof INodeHardLinkFile) {
        HardLinkFileInfo info = ((INodeHardLinkFile) inode)
          .getHardLinkFileInfo();
        // Only get the list of names as byte arrays under the lock.
        results = new ArrayList<byte[][]>(info.getReferenceCnt());
        for (int i = 0; i < info.getReferenceCnt(); i++) {
          try {
            results.add(getINodeByteArray(info.getHardLinkedFile(i)));
          } catch (IOException ioe) {
            NameNode.LOG.info("Hardlink may have been deleted", ioe);
          }
        }
      } else {
        return new String[] {};
      }
    } finally {
      readUnlock();
    }

    // Convert byte arrays to strings outside the lock since this is expensive.
    String[] files = new String[results.size()-1];
    int size = 0;
    for (int i = 0; i < results.size(); i++) {
      String file = getFullPathName(results.get(i));
      if (!file.equals(src)) {
        if (size >= files.length) {
          throw new IOException(src + " is not part of the list of hardlinked "
              + "files! This is a serious bug!");
        }
        files[size++] = file;
      }
    }
    return files;
  }
271275
def fileids(self):
        
        return [os.path.join(self.path,i) for i in os.listdir(self.path)]
923378
private function getIncludedFiles()
    {
        // Retrieve the include and exclude lists
        // from the options
        $include = Options::get('coverage.include');
        $exclude = Options::get('coverage.exclude');

        // Create empty arrays to store our filenames in
        $includedFiles = [];
        $excludedFiles = [];

        // If we have marked files as included
        if ($include !== null) {
            // Convert a string to an array so that
            // we only have to loop once
            if (!is_array($include)) {
                $include = [$include];
            }

            // Loop through each of the include glob strings
            foreach ($include as $glob) {
                // Prepend the current working directory to the glob
                $glob = $this->runner->pwd.'/'.$glob;

                // Add the glob results to the included files array
                $includedFiles = array_merge($includedFiles, glob_recursive($glob));
            }
        }

        // If we have marked files as excluded
        if ($exclude !== null) {
            // Convert a string to an array so that
            // we only have to loop once
            if (!is_array($exclude)) {
                $exclude = [$exclude];
            }

            // Loop through each of the include glob strings
            foreach ($exclude as $glob) {
                // Prepend the current working directory to the glob
                $glob = $this->runner->pwd.'/'.$glob;

                // Add the glob results to the excluded files array
                $excludedFiles = array_merge($excludedFiles, glob_recursive($glob));
            }
        }

        // Store the results
        $this->includedFiles = $includedFiles ?: [];
        $this->excludedFiles = $excludedFiles ?: [];
    }
378035
public static List<File> listFiles(File srcPath) throws IOException
   {
      List<File> result = new ArrayList<File>();

      if (!srcPath.isDirectory())
      {
         throw new IOException(srcPath.getAbsolutePath() + " is a directory");
      }

      for (File subFile : srcPath.listFiles())
      {
         result.add(subFile);
         if (subFile.isDirectory())
         {
            result.addAll(listFiles(subFile));
         }
      }

      return result;
   }
258077
private List<String> getVirtualFiles() {

        ArrayList<String> list = new ArrayList<String>();
        list.add(NAME_ELEMENT_CONTROLCODE);

        return list;
    }
444384
def files(self):
        
        # If no files but a recursion option ==> use the current directory
        if not self.args.files and self.recursive:
            return ['.']
        else:
            return self.args.files
36581
def get_all_filelist(data_dir):
    

    all_meta = []
    all_table = []
    all_element = []
    all_component = []

    special = ['METADATA.json', 'REFERENCES.json']

    for root, dirs, files in os.walk(data_dir):
        for basename in files:
            if basename in special:
                continue

            fpath = os.path.join(root, basename)
            fpath = os.path.relpath(fpath, data_dir)

            if basename.endswith('.metadata.json'):
                all_meta.append(fpath)
            elif basename.endswith('.table.json'):
                all_table.append(fpath)
            elif basename.endswith('.element.json'):
                all_element.append(fpath)
            elif basename.endswith('.json'):
                all_component.append(fpath)

    return (all_meta, all_table, all_element, all_component)
724
private synchronized List<Entry> getEntriesList( DirectoryEntry directory )
    {
        List<Entry> entries = contents.get( directory );
        if ( entries == null )
        {
            entries = new ArrayList<Entry>();
            contents.put( directory, entries );
        }
        return entries;
    }
823089
def get_paths(directory):
    '''
    '''
    fnames = [os.path.join(directory, f)
              for f in os.listdir(directory)
              if os.path.isfile(os.path.join(directory, f))
              and not f.startswith('.')]
    return fnames
927748
private static List<File> findFilesInDirectory(File directory,
			Pattern pattern, boolean scanRecursive) {
		List<File> files = new ArrayList<File>();
		String[] filesInDirectory = directory.list();
		if (filesInDirectory == null) {
			return files;
		}
		for (String fileToCheck : filesInDirectory) {
			File file = new File(directory, fileToCheck);
			if (file.isFile()) {
				if (pattern.matcher(fileToCheck).matches()) {
					files.add(file);
				}
			} else if (file.isDirectory()) {
				if (scanRecursive) {
					files.addAll(findFilesInDirectory(file, pattern,
							scanRecursive));
				}
			}
		}
		return files;
	}
761918
private List<File> scanFileSets() {
        final List<File> list = new ArrayList<File>();

        for (int i = 0; i < fileSets.size(); i++) {
            FileSet fs = fileSets.get(i);
            DirectoryScanner ds = fs.getDirectoryScanner(getProject());
            ds.scan();

            String[] names = ds.getIncludedFiles();
            for (String element : names) {
                list.add(new File(ds.getBasedir(), element));
            }
        }

        return list;
    }
905834
private File [] getSourceDirectories ()
  {
    final Set <File> directories = new LinkedHashSet <> ();
    if (this.sourceDirectories != null && this.sourceDirectories.length > 0)
    {
      directories.addAll (Arrays.asList (this.sourceDirectories));
    }
    else
    {
      if (this.defaultGrammarDirectoryJavaCC != null)
      {
        directories.add (this.defaultGrammarDirectoryJavaCC);
      }
      if (this.defaultGrammarDirectoryJJTree != null)
      {
        directories.add (this.defaultGrammarDirectoryJJTree);
      }
      if (this.defaultGrammarDirectoryJTB != null)
      {
        directories.add (this.defaultGrammarDirectoryJTB);
      }
    }
    return directories.toArray (new File [directories.size ()]);
  }
19999
def list_files(directory):
    '''
    
    '''
    ret = set()
    ret.add(directory)
    for root, dirs, files in safe_walk(directory):
        for name in files:
            ret.add(os.path.join(root, name))
        for name in dirs:
            ret.add(os.path.join(root, name))

    return list(ret)
30983
def get_program_files_dir():
    
    ProgramFiles = bjam.variable("ProgramFiles")
    if ProgramFiles:
        ProgramFiles = ' '.join(ProgramFiles)
    else:
        ProgramFiles = "c:\\Program Files"
    return ProgramFiles