Reference documentation and code samples for the Google Cloud Appengine Admin V1 Client class StaticFilesHandler.
Files served directly to the user for a given URL, such as images, CSS
stylesheets, or JavaScript source files. Static file handlers describe which
files in the application directory are static files, and which URLs serve
them.
Generated from protobuf messagegoogle.appengine.v1.StaticFilesHandler
Namespace
Google \ Cloud \ AppEngine \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ path
string
Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
↳ upload_path_regex
string
Regular expression that matches the file paths for all files that should be referenced by this handler.
Time a static file served by this handler should be cached by web proxies and browsers.
↳ require_matching_file
bool
Whether this handler should match the request if the file referenced by the handler does not exist.
↳ application_readable
bool
Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.
getPath
Path to the static files matched by the URL pattern, from the
application root directory. The path can refer to text matched in groupings
in the URL pattern.
Returns
Type
Description
string
setPath
Path to the static files matched by the URL pattern, from the
application root directory. The path can refer to text matched in groupings
in the URL pattern.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUploadPathRegex
Regular expression that matches the file paths for all files that should be
referenced by this handler.
Returns
Type
Description
string
setUploadPathRegex
Regular expression that matches the file paths for all files that should be
referenced by this handler.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getHttpHeaders
HTTP headers to use for all responses from these URLs.
Whether this handler should match the request if the file
referenced by the handler does not exist.
Returns
Type
Description
bool
setRequireMatchingFile
Whether this handler should match the request if the file
referenced by the handler does not exist.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getApplicationReadable
Whether files should also be uploaded as code data. By default, files
declared in static file handlers are uploaded as static
data and are only served to end users; they cannot be read by the
application. If enabled, uploads are charged against both your code and
static data storage resource quotas.
Returns
Type
Description
bool
setApplicationReadable
Whether files should also be uploaded as code data. By default, files
declared in static file handlers are uploaded as static
data and are only served to end users; they cannot be read by the
application. If enabled, uploads are charged against both your code and
static data storage resource quotas.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Appengine Admin V1 Client - Class StaticFilesHandler (2.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.4 (latest)](/php/docs/reference/cloud-appengine-admin/latest/V1.StaticFilesHandler)\n- [2.0.3](/php/docs/reference/cloud-appengine-admin/2.0.3/V1.StaticFilesHandler)\n- [1.3.5](/php/docs/reference/cloud-appengine-admin/1.3.5/V1.StaticFilesHandler)\n- [1.2.2](/php/docs/reference/cloud-appengine-admin/1.2.2/V1.StaticFilesHandler)\n- [1.1.1](/php/docs/reference/cloud-appengine-admin/1.1.1/V1.StaticFilesHandler)\n- [1.0.6](/php/docs/reference/cloud-appengine-admin/1.0.6/V1.StaticFilesHandler) \nReference documentation and code samples for the Google Cloud Appengine Admin V1 Client class StaticFilesHandler.\n\nFiles served directly to the user for a given URL, such as images, CSS\nstylesheets, or JavaScript source files. Static file handlers describe which\nfiles in the application directory are static files, and which URLs serve\nthem.\n\nGenerated from protobuf message `google.appengine.v1.StaticFilesHandler`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ AppEngine \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getPath\n\nPath to the static files matched by the URL pattern, from the\napplication root directory. The path can refer to text matched in groupings\nin the URL pattern.\n\n### setPath\n\nPath to the static files matched by the URL pattern, from the\napplication root directory. The path can refer to text matched in groupings\nin the URL pattern.\n\n### getUploadPathRegex\n\nRegular expression that matches the file paths for all files that should be\nreferenced by this handler.\n\n### setUploadPathRegex\n\nRegular expression that matches the file paths for all files that should be\nreferenced by this handler.\n\n### getHttpHeaders\n\nHTTP headers to use for all responses from these URLs.\n\n### setHttpHeaders\n\nHTTP headers to use for all responses from these URLs.\n\n### getMimeType\n\nMIME type used to serve all files served by this handler.\n\nDefaults to file-specific MIME types, which are derived from each file's\nfilename extension.\n\n### setMimeType\n\nMIME type used to serve all files served by this handler.\n\nDefaults to file-specific MIME types, which are derived from each file's\nfilename extension.\n\n### getExpiration\n\nTime a static file served by this handler should be cached\nby web proxies and browsers.\n\n### hasExpiration\n\n### clearExpiration\n\n### setExpiration\n\nTime a static file served by this handler should be cached\nby web proxies and browsers.\n\n### getRequireMatchingFile\n\nWhether this handler should match the request if the file\nreferenced by the handler does not exist.\n\n### setRequireMatchingFile\n\nWhether this handler should match the request if the file\nreferenced by the handler does not exist.\n\n### getApplicationReadable\n\nWhether files should also be uploaded as code data. By default, files\ndeclared in static file handlers are uploaded as static\ndata and are only served to end users; they cannot be read by the\napplication. If enabled, uploads are charged against both your code and\nstatic data storage resource quotas.\n\n### setApplicationReadable\n\nWhether files should also be uploaded as code data. By default, files\ndeclared in static file handlers are uploaded as static\ndata and are only served to end users; they cannot be read by the\napplication. If enabled, uploads are charged against both your code and\nstatic data storage resource quotas."]]