上传一个文件到指定目录
@param filePath
438105
function (filePath) {
    casper.wait(1, function () {
        this.echo('#green{upload:} #yellow{[' + filePath + ']}');
        this.fill('form[name=form1]', {
            "upfile": filePath,
            "addmat": '1',
            'overwrite': params.overwrite ? '0' : '1'
        }, true);
    });

    casper.wait(waitTime, function () {
        var info = casper.evaluate(function () {
            return document.getElementById('top_tips').innerText;
        });
        this.echo(info);
    });
}
1134373
function(filePath, targetPath, callback) {
            client
                .moveFile(filePath, targetPath)
                .then(function() {
                    __executeCallbackAsync(callback, [null]);
                })
                .catch(callback);
        }
599970
private static String getFilePath(String defaultPath, String filePath) {
		return defaultPath+File.separator+filePath;
	}
527762
def setFilepaths(self, filepaths):
        
        self.setFilepath(os.path.pathsep.join(filepaths))
1238882
@Override
  public void loadPath(File path, FileFilter filt) {
    if(path.exists()) {
      filePaths.add(path);
      fileFilters.add(filt);
    } else {
      System.err.printf("%s: File/path %s does not exist. Skipping.\n" , this.getClass().getName(), path.getPath());
    }
  }
576174
public function save($filePath = null) {
		
		// Determine the correct file path.
		$filePath = ($filePath == null) ? $this->configFilePath : $filePath;
		
		// Store the file
		file_put_contents ( $filePath, $this->getConfigFileText () );
	}
1328652
private void handleAuxClassPathFromFile(String filePath) throws IOException {
        try (BufferedReader in = new BufferedReader(UTF8.fileReader(filePath))) {
            while (true) {
                String s = in.readLine();
                if (s == null) {
                    break;
                }
                project.addAuxClasspathEntry(s);
            }
        }
    }
816738
private URI findFile(final String filePath, final boolean upload) {
        try {
            URI fileURI;
            try {
                fileURI = _hadoopDefaultFS.getUri().resolve(filePath);
            } catch (final Exception e) {
                fileURI = null;
            }

            if ((fileURI == null || !_hadoopDefaultFS.exists(new Path(fileURI))) && upload) {
                final File file = new File(filePath);
                if (!file.isFile()) {
                    throw new IllegalArgumentException("'" + filePath + " does not exist, or is not a file");
                }

                final String fileName = file.toPath().getFileName().toString();
                return _applicationDriver
                        .copyFileToHdfs(file, DATACLEANER_TEMP_DIR + "/" + UUID.randomUUID() + fileName);
            }

            return fileURI;
        } catch (final IOException e) {
            throw new IllegalArgumentException("Path '" + filePath + "' is not a proper file path");
        }
    }
395198
protected String adaptFilePath(String filePath) {
        // Convert windows file path to target FS
        String targetPath = filePath.replaceAll("\\\\", volumeType.getSeparator());

        return targetPath;
    }
1292432
public void addFile(String path, InputStream inputStream) throws IOException {
    addFile(path, inputStream, null);
  }
124577
private void registerDirectoryTree(Path path) {
        try {
            Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
                @Override
                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
                        throws IOException {
                    registerDirectory(dir);
                    return FileVisitResult.CONTINUE;
                }
            });
        } catch (IOException ex) {
            LOGGER.error("监控目录失败：" + path.toAbsolutePath(), ex);
        }
    }
309946
public BinaryUploadRequest setFileToUpload(String path) throws FileNotFoundException {
        params.files.clear();
        params.files.add(new UploadFile(path));
        return this;
    }
1011741
public void addFile(String path) throws LoadModelException{
		try {
			ArrayList<String[]> al = loadDict(path);		
			add(al); 
			indexLen = MIN_LEN;
			createIndex();
		} catch (IOException e) {
			throw new LoadModelException("加载词典错误"+e.toString());
		}
	}
910767
public static void deleteFilePath(FilePath workspace, String path) throws IOException {
        if (StringUtils.isNotBlank(path)) {
            try {
                FilePath propertiesFile = new FilePath(workspace, path);
                propertiesFile.delete();
            } catch (Exception e) {
                throw new IOException("Could not delete temp file: " + path);
            }
        }
    }
823755
public boolean upload(String path, String fileName, InputStream fileStream) {
		try {
			client.setFileType(FTPClient.BINARY_FILE_TYPE);
		} catch (IOException e) {
			throw new FtpException(e);
		}
		
		if(StrUtil.isNotBlank(path)) {
			mkDirs(path);
			boolean isOk = cd(path);
			if(false == isOk) {
				return false;
			}
		}
		
		try {
			return client.storeFile(fileName, fileStream);
		} catch (IOException e) {
			throw new FtpException(e);
		}
	}
211046
public static boolean createFolder(String folderPath) {
        if (!StringUtils.isEmpty(folderPath)) {
            File folder = new File(folderPath);
            return createFolder(folder);
        }
        return false;
    }
259199
public static OutputStream toFile(String filepath) throws FileNotFoundException {
		if(Strings.isValid(filepath)) {
			return new FileOutputStream(new File(filepath));
		}
		return null;
	}