Override the directory where uploaded files will be stored.
 This is a sensible default for uploaders that are meant to be mounted:
326409
def store_dir
      default_path = "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"

      return File.join(Decidim.base_uploads_path, default_path) if Decidim.base_uploads_path.present?
      default_path
    end
489257
function FileSystemLoader(dir, options) {
    this.dir = dir.replace(/\/$/, '');
    this.options = options || (options = {});
    this.posts = [];
    this.files = {};
    this.ignore = {};
    var self = this;
    (options.ignore || FileSystemLoader.ignore).forEach(function (file) {
        self.ignore[file] = true;
    });
    process.nextTick(function () {
        self.loadPosts();
    });
}
223526
def store_directory(ctx, param, value):
    """"""
    Path(value).mkdir(parents=True, exist_ok=True)
    set_git_home(value)
    return value
1132409
def push(self, dir):
        
        self.stack.append(os.getcwd())
        os.chdir(dir or os.getcwd())
1024041
private function _directory()
    {
        if ($this->isSFTP()) {
            // == DIRECTORY_SEPARATOR ? '' : $pwd;
            $pwd = @$this->ftp->pwd();
        } else {
            $pwd = @ftp_pwd($this->ftp);
        }
        if (!$pwd) {
            $this->fail("couldn't get current directory");
        }
    }
640241
public void goUpDir() throws IOException, ServerException {
        try {
            controlChannel.execute(Command.CDUP);
            // alternative: changeDir("..");
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(
                                urce,
                                "Server refused changing current directory");
        }
    }
522590
def resolve_upload_path(self, filename=None):
        
        if filename is None:
            return settings.FLOW_EXECUTOR['UPLOAD_DIR']

        return os.path.join(settings.FLOW_EXECUTOR['UPLOAD_DIR'], filename)
375393
def set_server_dir(self, dir):
        
        self.dir = os.path.abspath(dir)
        config = os.path.join(self.dir, 'etc', 'grid', 'config.xml')
        self.configured = os.path.exists(config)
522596
def setup_dirs(self, storage_dir):
        ''''''
        self.storage_dir = expanduser(storage_dir)
        if ' ' in self.storage_dir:
            raise ValueError('storage dir path cannot contain spaces, please '
                             'specify a path with --storage-dir')
        self.build_dir = join(self.storage_dir, 'build')
        self.dist_dir = join(self.storage_dir, 'dists')
695111
def put_directory(self, mdir):
        
        log.debug('PutDirectory %r', mdir)
        headers = {"Content-Type": "application/json; type=directory"}
        res, content = self._request(mdir, "PUT", headers=headers)
        if res["status"] != "204":
            raise errors.MantaAPIError(res, content)
201488
def get_config_directory(override_files=False):
    
    if override_files:
        possible_dirs = [override_files]

    else:
        xdg_config_home = os.environ.get('XDG_CONFIG_HOME') or \
            os.path.expanduser('~/.config')
        possible_dirs = [os.path.join(xdg_config_home, "supernova.d/"),
                         os.path.expanduser("~/.supernova.d/"),
                         ".supernova.d/"]

    for config_dir in reversed(possible_dirs):
        if os.path.isdir(config_dir):
            return config_dir

    return False
120088
public function setTargetdir()
	{
		//set the target dir
		$this->target_dir =  Path::base() . $this->upload_path;

		//check if the directory exists and create if not
		if( ! file_exists($this->target_dir)) mkdir($this->target_dir);

		return $this;

	}
685638
@VisibleForTesting
	static void createUploadDir(final Path uploadDir, final Logger log, final boolean initialCreation) throws IOException {
		if (!Files.exists(uploadDir)) {
			if (initialCreation) {
				log.info("Upload directory {} does not exist. " + uploadDir);
			} else {
				log.warn("Upload directory {} has been deleted externally. " +
					"Previously uploaded files are no longer available.", uploadDir);
			}
			checkAndCreateUploadDir(uploadDir, log);
		}
	}
264180
function() {
      var i = 0;
      grunt.log.writeln( 'Ensuring directories:' );

      var ensureDir = function( dir ) {
        grunt.log.ok( options.remoteDir + dir );

        if ( directoriesChecked.indexOf( dir ) > -1 && ((i + 1) < dirs.length) ) {
          directoriesChecked.push( dir );
          i += 1;
          ensureDir( dirs[ i ] );
        } else if ( i >= dirs.length ) {
          uploadFiles();
        } else {
          directoriesChecked.push( dir );
          client
            .raw( 'mkdir -p "' + options.remoteDir + dir + '"' )
            .exec(function( err, res ) {
              if ( err ) {
                grunt.log.error( err );
              }

              if ( (i + 1) < dirs.length ) {
                 i += 1;
                ensureDir( dirs[ i ] );
              } else {
                uploadFiles();
              }
            });
        }
      };

      if ( dirs.length > 0 ) {
        ensureDir( dirs[0] );
      }
    }
848825
def _fix_install_dir_for_user_site(self):
        
        if not self.user or not site.ENABLE_USER_SITE:
            return

        self.create_home_path()
        if self.install_userbase is None:
            msg = "User base directory is not specified"
            raise DistutilsPlatformError(msg)
        self.install_base = self.install_platbase = self.install_userbase
        scheme_name = os.name.replace('posix', 'unix') + '_user'
        self.select_scheme(scheme_name)
698907
protected function _setUploadDir($path = null) {
		$path = (string)$path;
		if (file_exists($path)) {
			$this->_pathUploadDir = $path;
		}
	}
1253393
def chdir(self, dir, change_os_dir=0):
        
        curr=self._cwd
        try:
            if dir is not None:
                self._cwd = dir
                if change_os_dir:
                    os.chdir(dir.get_abspath())
        except OSError:
            self._cwd = curr
            raise