************** FILES ************** //
961577
private void loadFiles() {
		m_filesMap = new HashMap<String, FileInfo>();
		List<ColumnValue> list = m_helper.get(m_storeName, m_row, "File/");
		for(ColumnValue v : list) {
			FileInfo fi = new FileInfo(v.columnName, v.getString());
			m_filesMap.put(fi.getName(), fi); 
		}
	}
1157108
public static void copyFiles(File[] files, String storageFolder) throws IOException {
        storageFolder = checkFolder(storageFolder) + ValueConsts.SEPARATOR;
        for (File file : files) {
            copyFile(file, new File(storageFolder + file.getName()));
        }
    }
286736
function(files, next) {
        var fromFile = files[0],
          toFile = files[1];

        differ(id, fromFile, toFile, next);
      }
510622
public void setFiles(final List<File> files) {
        if (files == null && this.files == null) {
            return;
        } else if (files == null) {
            removeChild(this.files);
            this.files = null;
        } else if (this.files == null) {
            this.files = new FileList(CommonConstants.CS_FILE_TITLE, files);
            appendChild(this.files, false);
        } else {
            this.files.setValue(files);
        }
    }
420869
function resolveFilesInParams(params, files) {
	var fileIds = Object.keys(files || {});

	var fileCount = fileIds.length;
	if (fileCount === 0) {
		return;
	}

	// scan all members for files, and collect children

	function addMembers(list, obj) {
		var keys = Object.keys(obj || {});

		for (var i = 0; i < keys.length; i++) {
			list.push({
				owner: obj,
				key: keys[i],
				value: obj[keys[i]]
			});
		}
	}

	var list = [];

	addMembers(list, params);

	for (var i = 0; i < list.length && fileCount > 0; i++) {
		var member = list[i];

		if (!member.value) {
			continue;
		}

		var type = typeof member.value;

		if (type === 'object') {
			// append children to the end of the list

			addMembers(list, member.value);
		} else if (type === 'string' && files[member.value]) {
			// file found for this property, so assign it

			var file = files[member.value];

			logger.verbose('Accepted file', '"' + file.partName + '":', file.fileName);

			member.owner[member.key] = file;

			delete files[member.value];
			fileCount -= 1;
		}
	}
}
477187
function saveFile() {
      if (currentFile) {
        if (!currentFile.oldName) {
          currentFile.oldName = possibleOldName;
        }

        if (!currentFile.newName) {
          currentFile.newName = possibleNewName;
        }

        if (currentFile.newName) {
          files.push(currentFile);
          currentFile = null;
        }
      }

      possibleOldName = undefined;
      possibleNewName = undefined;
    }
151568
protected function addFile(File $file) {
        $files = $this->getFiles();
        $files[$file->getName()] = $file;
        $this->setFiles($files);
    }
411274
public static void mergeFiles(File[] files, File destinationFile, String[] filterRegex) throws IOException {
        if (filterRegex.length < files.length) {
            filterRegex = ArrayUtils.concatArrays(filterRegex, new String[files.length - filterRegex.length]);
        }
        createNewFile(destinationFile);
        int i = 0;
        for (File file : files) {
            mergeFiles(file, destinationFile, filterRegex[i++]);
        }
    }
1298403
private List<File> listFiles(File file, List<File> files) {
        File[] children = file.listFiles();
        
        if (children != null) {
            for (File child : children) {
                files.add(child);
                listFiles(child, files);
            }
        }
        
        return files;
    }
244437
function(/**string*/ outDir, /**string*/ fileName, /**string*/ content) {
		fs.writeFileSync(outDir + "/" + fileName, content, IO.encoding);
	}
1107963
public static void deleteDirectory(File fileOrDirectory) {
        if (fileOrDirectory.isDirectory())
            for (File child : fileOrDirectory.listFiles())
                deleteDirectory(child);

        fileOrDirectory.delete();
    }
289253
private void openUploadWithFiles(JavaScriptObject files) {

        JsArray<CmsFileInfo> cmsFiles = files.cast();
        List<CmsFileInfo> fileObjects = new ArrayList<CmsFileInfo>();
        for (int i = 0; i < cmsFiles.length(); ++i) {
            fileObjects.add(cmsFiles.get(i));
        }
        ((CmsDialogUploadButtonHandler)m_uploadButton.getButtonHandler()).openDialogWithFiles(fileObjects);
    }
13188
public void setFiles(java.util.Collection<StreamFile> files) {
        if (files == null) {
            this.files = null;
            return;
        }

        this.files = new java.util.ArrayList<StreamFile>(files);
    }
283487
function copySchemaFiles() {
    const resolvedSrcSchemaPaths = path.resolve(rootDir, srcSchemaPaths);

    glob(resolvedSrcSchemaPaths, void(0), function(error, files) {
        files.forEach((filePath) => {
        const destSchemaPath = filePath.replace(/(\bsrc\b)(?!.*\1)/, destDir);
            fs.copyFileSync(filePath, destSchemaPath);
        });
    });
}
734221
function (files) {
    if (!_.isArray(files)) files = [files];
    return _.chain(files).map(fss.target).map(function (f) {
        if (!fss.directoryExists(f)) return f;
        return fss.allTargetFilePaths(f);
    }).flatten().uniq().reject(fss.isDotFile).map(pathSuffix).value();
}
1017700
function checkRequiredFiles(files) {
  try {
    files.forEach(filePath => {
      fs.accessSync(filePath, fs.F_OK);
    });
    return true;
  } catch (err) {
    return false;
  }
}
692996
function filesToPacks(files) {
  return files.map(function(id) {
    return {
      id: id,
      source: readFile(id),
      mtime: readMTime(id)
    };
  });
}