Move file_path.h to base/files.
TBR=sky git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184344 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
android_webview/browser
apps/app_host
ash
shell
content_client
system
test
base
android
base.gypbase.gypibase_paths.ccbase_paths_android.ccbase_paths_mac.mmbase_paths_posix.ccbase_paths_win.cccommand_line.cccommand_line_unittest.ccfile_path.hfile_util.ccfile_util.hfile_util_android.ccfile_util_linux.ccfile_util_mac.mmfile_util_posix.ccfile_util_unittest.ccfile_util_win.ccfile_version_info_mac.mmfile_version_info_win.ccfiles
file_path.ccfile_path.hfile_path_unittest.ccfile_path_watcher.hfile_path_watcher_browsertest.ccfile_path_watcher_linux.ccfile_path_watcher_win.ccfile_util_proxy.himportant_file_writer.ccimportant_file_writer.himportant_file_writer_unittest.ccscoped_temp_dir.h
i18n
json
mac
native_library_mac.mmnative_library_posix.ccnix
path_service.ccpath_service_unittest.ccperftimer.ccplatform_file.hplatform_file_posix.ccplatform_file_win.ccprefs
process_util.hprocess_util_unittest.ccscoped_native_library_unittest.ccsys_info.hsys_info_chromeos.ccsys_info_win.cctest
perf_test_suite.cctest_file_util.htest_file_util_linux.cctest_file_util_posix.cctest_file_util_win.cctest_shortcut_win.cctest_shortcut_win.htest_suite.cctest_support_android.cc
value_conversions.ccwin
cc
chrome
app
app_mode_loader_mac.mmbreakpad_linux.ccbreakpad_mac.mmchrome_main_app_mode_mac.mmchrome_main_mac.mmnacl_fork_delegate_linux.cc
browser
android
app_controller_mac.mmauto_launch_trial.ccautofill
automation
background
background_application_list_model_unittest.ccbackground_mode_manager_gtk.ccbackground_mode_manager_win.cc
bookmarks
bookmark_codec_unittest.ccbookmark_html_writer.hbookmark_node_data.hbookmark_pasteboard_helper_mac.mmbookmark_storage.ccbookmark_utils.cc
browser_shutdown.ccbrowser_util_win.ccbrowsing_data
browsing_data_file_system_helper.hbrowsing_data_indexed_db_helper.hbrowsing_data_indexed_db_helper_browsertest.ccbrowsing_data_local_storage_helper.hbrowsing_data_local_storage_helper_browsertest.ccbrowsing_data_remover_browsertest.ccbrowsing_data_remover_unittest.cc
captive_portal
chrome_browser_main.ccchrome_browser_main_mac.mmchrome_browser_main_win.ccchrome_to_mobile_service.hchromeos
app_mode
boot_times_loader.cccontacts
contact_database.hcontact_database_unittest.ccgdata_contacts_service_unittest.ccgoogle_contact_store.cc
cros
customization_document.ccdrive
drive_cache.hdrive_cache_metadata.hdrive_feed_processor.hdrive_file_system_unittest.ccdrive_file_system_util.ccdrive_file_system_util_unittest.ccdrive_resource_metadata.hdrive_sync_client_unittest.ccdrive_webapps_registry.ccdrive_webapps_registry_unittest.ccfile_change.h
file_system
mock_directory_change_observer.hresource_entry_conversion_unittest.ccstale_cache_files_remover_unittest.ccextensions
default_app_order.ccdefault_app_order_unittest.ccexternal_filesystem_apitest.ccfile_browser_handler_api.ccfile_browser_handler_api.hfile_browser_private_api.ccfile_manager_browsertest.ccfile_manager_util.hinstall_limiter.hzip_file_creator.h
external_metrics.himageburner
kiosk_mode
login
login_utils.ccmock_user_image_manager.hmock_user_manager.hparallel_authenticator.ccparallel_authenticator_unittest.ccuser_image_loader.ccuser_image_manager_impl.ccuser_manager_impl.ccwallpaper_manager.ccwallpaper_manager.h
mobile
mobile_config.ccsettings
system
drm_settings.ccinput_device_settings.ccname_value_pairs_parser.ccstatistics_provider.ccsyslogs_provider.cctimezone_settings.cc
system_logs
version_loader.cccomponent_updater
component_unpacker.hcomponent_updater_service.ccpepper_flash_component_installer.cc
crash_handler_host_linux.cccrash_recovery_browsertest.cccrash_upload_list.ccpnacl
recovery_component_installer.ccswiftshader_component_installer.cctest
diagnostics
download
chrome_download_manager_delegate_unittest.ccdownload_browsertest.ccdownload_danger_prompt_browsertest.ccdownload_extensions.hdownload_file_icon_extractor.hdownload_path_reservation_tracker_unittest.ccdownload_prefs.hdownload_query.ccdownload_query_unittest.ccdownload_status_updater_win.ccdownload_util.hsave_page_browsertest.cc
enumerate_modules_model_win.ccextensions
activity_database.hactivity_database_unittest.ccextension_browsertest.ccextension_browsertest.hextension_creator_filter.ccextension_disabled_ui_browsertest.ccextension_function_test_utils.ccextension_nacl_browsertest.ccextension_protocols.ccextension_resource_protocols.ccextension_service.hextension_service_unittest.hextension_startup_browsertest.ccextension_sync_data_unittest.ccextension_system.ccexternal_loader.hexternal_pref_loader.ccexternal_provider_impl.ccexternal_registry_loader_win.ccfile_reader_unittest.ccinstalled_loader.cclazy_background_page_apitest.ccpack_extension_job.hpermissions_updater_unittest.ccplatform_app_launcher.ccrequirements_checker_browsertest.ccsandboxed_unpacker.hscript_bubble_controller_unittest.ccstate_store.hsystem_info_event_router.hunpacked_installer.h
fast_shutdown_browsertest.ccapi
api_resource_manager_unittest.cc
app_notification_manager.ccapp_notification_storage.ccapp_notification_storage_unittest.cccomponent_loader.hconvert_user_script.ccconvert_user_script_unittest.ccconvert_web_app.ccconvert_web_app_unittest.cccrx_installer.hbookmarks
declarative_webrequest
developer_private
downloads
file_system
management
media_galleries_private
gallery_watch_manager.hgallery_watch_state_tracker.ccmedia_galleries_eject_apitest.ccmedia_galleries_private_api.ccmedia_galleries_watch_apitest.cc
messaging
native_message_process_host.ccnative_message_process_host_unittest.ccnative_messaging_apitest_posix.cc
record
serial
storage
managed_value_store_cache.hpolicy_value_store_unittest.ccsettings_backend.hsettings_frontend.ccsettings_storage_factory.hsettings_test_util.ccsync_or_local_value_store_cache.cc
system_info_storage
web_request
webstore_private
docs
examples
updater
user_script_master.ccuser_script_master.huser_script_master_unittest.ccfeedback
first_run
google
google_apis
drive_api_operations_unittest.ccdrive_api_parser.ccdrive_api_parser_unittest.ccgdata_wapi_operations_unittest.ccgdata_wapi_parser.ccgdata_wapi_parser_unittest.ccmock_drive_service.ccoperation_registry.h
history
android
android_cache_database.handroid_cache_database_unittest.ccandroid_provider_backend.handroid_provider_backend_unittest.ccandroid_urls_database_unittest.ccurls_sql_handler_unittest.ccvisit_sql_handler_unittest.cc
download_database.ccdownload_row.hexpire_history_backend_unittest.cchistory_backend.hhistory_backend_unittest.cchistory_database_unittest.cchistory_querying_unittest.cchistory_service.hhistory_unittest.ccin_memory_database.ccin_memory_url_index.hin_memory_url_index_unittest.ccshortcuts_backend.hshortcuts_database.htext_database.htext_database_manager.htext_database_manager_unittest.ccthumbnail_database_unittest.cctop_sites_backend.cctop_sites_backend.htop_sites_database_unittest.ccurl_database_unittest.ccurl_index_private_data.hvisit_database_unittest.ccimporter
firefox2_importer.ccfirefox2_importer.hfirefox3_importer.hfirefox_importer_unittest.ccfirefox_importer_unittest_utils_mac.ccfirefox_profile_lock.ccfirefox_profile_lock.hfirefox_proxy_settings.ccfirefox_proxy_settings_unittest.ccie_importer.ccie_importer.himporter_data_types.hmork_reader.ccnss_decryptor_mac.mmnss_decryptor_system_nss.ccnss_decryptor_win.ccsafari_importer.hsafari_importer_unittest.mm
mac
managed_mode
media_gallery
linux
mtp_device_delegate_impl_linux.ccmtp_device_object_enumerator.hmtp_read_file_worker.hmtp_recursive_device_object_enumerator.h
mac
media_file_system_registry.ccmedia_file_system_registry.hmedia_galleries_preferences.hmedia_galleries_test_util.ccmtp_device_delegate_impl.hscoped_mtp_device_map_entry.hwin
metrics
mouseleave_browsertest.ccnacl_host
net
chrome_fraudulent_certificate_reporter_unittest.ccnet_log_temp_file.hnet_log_temp_file_unittest.ccpref_proxy_config_tracker_impl_unittest.ccsqlite_persistent_cookie_store.ccsqlite_server_bound_cert_store.cctransport_security_persister.cctransport_security_persister.htransport_security_persister_unittest.cc
page_cycler
parsers
password_manager
pepper_broker_infobar_delegate.hperformance_monitor
platform_util_mac.mmplatform_util_win.ccplugins
policy
app_pack_updater.hbrowser_policy_connector.cccloud_policy_browsertest.ccconfig_dir_policy_loader.hconfiguration_policy_handler.ccconfiguration_policy_pref_store_unittest.ccenterprise_install_attributes.hpolicy_browsertest.ccpolicy_loader_mac.hpolicy_path_parser.hpolicy_path_parser_mac.mmpolicy_path_parser_unittest.ccpolicy_prefs_browsertest.cc
popup_blocker_browsertest.cctest
user_cloud_policy_store.huser_cloud_policy_store_chromeos.huser_policy_disk_cache.huser_policy_token_loader.hpredictors
prefs
printing
print_dialog_cloud_interative_uitest.ccprint_dialog_cloud_internal.hprint_dialog_cloud_unittest.ccprint_dialog_gtk.hprinter_manager_dialog_win.ccprinting_layout_browsertest.cc
process_info_snapshot_mac_unittest.ccprocess_singleton.hprocess_singleton_browsertest.ccprocess_singleton_linux.ccprocess_singleton_linux_unittest.ccprocess_singleton_win.ccprofiles
off_the_record_profile_impl.ccoff_the_record_profile_io_data.hprofile_impl.ccprofile_impl.hprofile_info_cache.hprofile_info_interface.hprofile_io_data.hprofile_manager.ccprofile_manager.hprofile_metrics.ccprofile_shortcut_manager.hstorage_partition_descriptor.h
renderer_host
safe_browsing
client_side_detection_host_unittest.ccdownload_protection_service.hdownload_protection_service_unittest.cclocal_safebrowsing_test_server.hsafe_browsing_database.hsafe_browsing_service.hsafe_browsing_service_browsertest.ccsandboxed_zip_analyzer.hsignature_util_win.ccsignature_util_win_unittest.cc
service
sessions
base_session_service.hbetter_session_restore_browsertest.ccpersistent_tab_restore_service.ccsession_restore_browsertest.cctab_restore_browsertest.cc
shell_integration.hshell_integration_linux.ccshell_integration_linux.hshell_integration_unittest.ccshell_integration_win_unittest.ccspellchecker
ssl
storage_monitor
disk_info_mac.himage_capture_device.himage_capture_device_manager_unittest.mmmedia_device_notifications_utils.hmedia_device_notifications_utils_unittest.ccmedia_storage_util.hmedia_transfer_protocol_device_observer_linux.ccportable_device_watcher_win.ccremovable_device_constants.hremovable_device_notifications_chromeos.ccremovable_device_notifications_linux.ccremovable_storage_notifications.htest_volume_mount_watcher_win.ccudev_util_linux.ccvolume_mount_watcher_win.h
sync
glue
profile_sync_components_factory_impl_unittest.ccprofile_sync_service_bookmark_unittest.cctest
integration
sync_file_system
task_manager
task_profiler
themes
ui
app_list
ash
launcher
chrome_launcher_controller_per_app_unittest.ccchrome_launcher_controller_per_browser_unittest.cclauncher_favicon_loader_browsertest.cc
screenshot_taker.cccocoa
extensions
gtk
hung_plugin_tab_helper.hmetro_pin_tab_helper_win.ccnetwork_profile_bubble.ccstartup
startup_browser_creator.ccstartup_browser_creator.hstartup_browser_creator_browsertest.ccstartup_browser_creator_impl.hstartup_browser_creator_interactive_uitest.cc
tabs
toolbar
views
download
find_bar_controller_browsertest.ccselect_file_dialog_extension_unittest.ccssl_client_certificate_selector_browsertest.ccuser_data_dir_dialog_view.hweb_dialog_view_browsertest.ccwebui
chromeos
imageburner
extensions
fileicon_source.ccfileicon_source.hnet_internals
ntp
options
print_preview
screenshot_source.ccvalue_store
web_applications
webdata
common
auto_start_linux.ccchrome_constants.ccchrome_constants.hchrome_paths_android.ccchrome_paths_unittest.ccchrome_paths_win.ccchrome_utility_messages.hchrome_version_info_win.cclogging_chrome.cc
extensions
api
extension.ccextension.hextension_builder.hextension_file_util.ccextension_l10n_util_unittest.ccextension_resource.hextension_set_unittest.ccextension_unittest.ccmanifest_handler_unittest.ccmanifest_tests
unpacker.huser_script.huser_script_unittest.ccmac
app_mode_chrome_locator.mmapp_mode_chrome_locator_unittest.mmapp_mode_common.hmock_launchd.ccmock_launchd.h
net
render_messages.hsafe_browsing
service_process_util_mac.mmservice_process_util_unittest.ccspellcheck_common.ccswitch_utils_unittest.ccweb_apps_unittest.cczip.hzip_reader.hinstaller
gcapi
launcher_support
mini_installer
setup
test
alternate_version_generator.ccalternate_version_generator_main.ccresource_loader.ccresource_updater.ccupgrade_test.cc
util
auto_launch_util.ccbrowser_distribution.ccbrowser_distribution.hchrome_app_host_operations.ccchrome_binaries_operations.ccchrome_browser_operations.ccchrome_frame_operations.ccconditional_work_item_list.hcopy_tree_work_item.hcreate_dir_work_item.hdelete_reg_value_work_item_unittest.ccdelete_tree_work_item.hfake_installation_state.hgoogle_chrome_distribution.ccgoogle_chrome_distribution_dummy.ccgoogle_update_util.cchelper.ccinstall_util.hinstallation_state.hinstallation_validator_unittest.ccinstaller_state.hinstaller_state_unittest.ccinstaller_util_test_common.cclogging_installer.cclogging_installer_unittest.ccmove_tree_work_item.hproduct_operations.hproduct_unittest.hself_cleaning_temp_dir.hset_reg_value_work_item_unittest.ccshell_util.ccshell_util.hwork_item_list.cc
nacl
plugin
renderer
service
test
automation
base
chrome_test_suite.hin_process_browser_test.ccinteractive_test_utils_win.cctest_launcher_utils.htesting_profile_manager.ccui_test_utils.ccv8_unit_test.hweb_ui_browsertest.h
chromedriver
chrome_android_impl.ccchrome_desktop_impl.ccchrome_finder.ccchrome_finder_mac.mmchrome_finder_unittest.ccchrome_launcher_impl.cccommands_unittest.cc
gpu
logging
mini_installer_test
nacl
perf
dom_checker_uitest.ccindexeddb_uitest.ccmemory_test.ccpage_cycler_test.cc
rendering
tab_switching_test.ccurl_fetch_test.ccreliability
ui
webdriver
tools
convert_dict
crash_service
mac_helpers
perf
flush_cache
profiles
safe_browsing
chrome_frame
bho.ccchrome_frame_delegate.hchrome_launcher_unittest.cc
crash_reporting
dll_redirector.ccsimple_resource_loader.ccsimple_resource_loader.htest
chrome_frame_automation_mock.hchrome_frame_test_utils.ccchrome_frame_test_utils.hchrome_frame_ui_test_utils.hdll_redirector_loading_test.ccmock_ie_event_sink_test.h
test_utils.ccnet
perf
reliability
simple_resource_loader_test.cctest_scrubber.ccutil_unittests.ccchromeos
cloud_print/service/win
components/visitedlink
content
app
browser
accessibility
browser_accessibility_state_impl_win.ccdump_accessibility_tree_helper.hdump_accessibility_tree_helper_mac.mmdump_accessibility_tree_helper_win.cc
appcache
browser_child_process_host_impl.ccchild_process_launcher.ccchild_process_security_policy_browsertest.ccchild_process_security_policy_impl.ccchild_process_security_policy_unittest.ccdevice_orientation
devtools
dom_storage
download
base_file.hdownload_browsertest.ccdownload_create_info.hdownload_file.hdownload_file_factory.hdownload_item_impl.hdownload_item_impl_delegate.hdownload_net_log_parameters.ccdrag_download_file.hdrag_download_file_browsertest.ccdrag_download_util.ccfile_metadata_linux.ccfile_metadata_mac.mmfile_metadata_unittest_linux.ccmhtml_generation_browsertest.ccmock_download_file.hsave_file.hsave_item.hsave_package.ccsave_package.hsave_package_unittest.ccsave_types.h
fileapi
geolocation
gpu
hyphenator
in_process_webkit
loader
mime_registry_message_filter.hpepper_flash_settings_helper_impl.ccplugin_loader_posix_unittest.ccplugin_process_host.ccplugin_service_impl.ccpower_save_blocker_linux.ccppapi_plugin_process_host.ccppapi_plugin_process_host.hrenderer_host
file_utilities_message_filter.h
safe_util_win.ccpepper
browser_ppapi_host_impl.hpepper_flash_file_message_filter.hpepper_message_filter.ccpepper_message_filter.h
render_message_filter.hspeech
storage_partition_impl.hstorage_partition_impl_map.ccsystem_message_window_win_unittest.ccweb_contents
web_contents_drag_win.ccweb_drag_dest_gtk.ccweb_drag_source_gtk.hweb_drag_source_mac.hweb_drag_source_mac.mm
worker_host
common
child_process_host_impl.cc
gpu
mac
mime_registry_messages.hresource_dispatcher.ccsandbox_init_mac.ccsandbox_mac_diraccess_unittest.mmsandbox_mac_unittest_helper.mmset_process_title.ccgpu
plugin
public
browser
content_browser_client.ccdevtools_http_handler_delegate.hdownload_item.hdownload_manager.hdownload_manager_delegate.hdownload_save_info.hstorage_partition.h
common
test
renderer
browser_plugin
gpu
pepper
pepper_directory_reader_host.ccpepper_file_chooser_host.ccpepper_file_chooser_host_unittest.ccpepper_hung_plugin_filter.hpepper_plugin_delegate_impl.ccrenderer_ppapi_host_impl.cc
renderer_webkitplatformsupport_impl.ccshell
android
browsertests_apk
test
content_browser_test.cccontent_browser_test_utils.cc
gpu
layout_browsertest.cclayout_browsertest.hlayout_test_http_server.htest_content_browser_client.cctest_content_client.ccwebrtc_audio_device_test.hutility
zygote
courgette
crypto
device/bluetooth
gpu/tools/compositor_model_bench
ipc
media
audio
base
ffmpeg
filters
blocking_url_protocol_unittest.ccffmpeg_demuxer_unittest.ccfile_data_source.hfile_data_source_unittest.cc
test
ffmpeg_tests
tools
video
capture
webm
chromeos
net
android
base
cert_test_util.cccert_verify_proc_unittest.ccclient_cert_store_impl_unittest.ccdirectory_lister.hdirectory_lister_unittest.ccfile_stream_context_posix.ccfile_stream_context_win.ccfilter.ccmime_util.hmock_file_stream.hmulti_threaded_cert_verifier_unittest.ccnet_util.ccnet_util_posix.ccnet_util_unittest.ccnet_util_win.ccnss_cert_database_unittest.ccplatform_mime_util.htest_data_directory.htest_root_certs.cctransport_security_state_unittest.ccunix_domain_socket_posix_unittest.ccupload_data_stream_unittest.ccupload_element.hupload_file_element_reader.hx509_certificate_unittest.cc
disk_cache
backend_impl.ccbackend_impl.hblock_files.hcache_util_win.ccdisk_cache_test_base.hdisk_cache_test_util.hfile_win.cc
flash
mapped_file_avoid_mmap_posix.ccmapped_file_posix.ccmapped_file_win.ccstress_cache.ccdns
http
http_auth_gssapi_posix.cchttp_cache.hhttp_network_transaction_spdy2_unittest.cchttp_network_transaction_spdy3_unittest.cchttp_stream_parser_unittest.ccinfinite_cache.cc
proxy
proxy_config_service_linux.ccproxy_config_service_linux_unittest.ccproxy_script_fetcher_impl_unittest.cc
socket
test
tools
dns_fuzz_stub
dump_cache
testserver
tld_cleanup
url_request
ppapi
printing
remoting
base
host
audio_capturer_linux.ccbranding.hconfig_file_watcher.hconfig_file_watcher_unittest.ccdaemon_process.ccdesktop_session_win.hipc_constants.hjson_host_config.h
linux
policy_hack
remoting_me2me_host.ccsas_injector_win.ccsetup
usage_stats_consent_mac.ccwin
protocol
rlz
chromeos
lib
mac
test
sandbox/linux/services
sql
sync
internal_api
syncable
tools
testserver
testing/android
third_party
tools
ui
aura
test
base
clipboard
dragdrop
drag_utils.hos_exchange_data.hos_exchange_data_provider_aura.hos_exchange_data_provider_gtk.ccos_exchange_data_provider_gtk.hos_exchange_data_provider_win.cc
resource
data_pack_unittest.ccresource_bundle.hresource_bundle_android.ccresource_bundle_ios.mmresource_bundle_mac.mmresource_bundle_unittest.cc
text
ui_base_paths.ccwin
compositor
gfx
gl
gl_implementation_android.ccgl_implementation_linux.ccgl_implementation_mac.ccgl_implementation_win.cc
shell_dialogs
surface
test
views
examples
content_client
webkit
appcache
base
blob
blob_data.hblob_storage_controller_unittest.ccblob_url_request_job_unittest.cclocal_file_stream_reader.hlocal_file_stream_reader_unittest.ccshareable_file_reference.h
chromeos
fileapi
database
dom_storage
dom_storage_area.hdom_storage_context.hdom_storage_database.hdom_storage_database_unittest.ccdom_storage_namespace.hsession_storage_database.h
fileapi
external_mount_points.ccexternal_mount_points_unittest.ccfile_system_dir_url_request_job.hfile_system_dir_url_request_job_unittest.ccfile_system_directory_database.hfile_system_file_util.hfile_system_mount_point_provider.hfile_system_origin_database.hfile_system_origin_database_unittest.ccfile_system_quota_client.ccfile_system_quota_client.hfile_system_url_request_job.ccfile_system_url_request_job_unittest.ccfile_system_url_unittest.ccfile_system_usage_cache.ccfile_system_usage_cache.hfile_system_util.ccfile_system_util.hfile_system_util_unittest.ccfile_writer_delegate.hisolated_context.ccisolated_context.hisolated_mount_point_provider.cclocal_file_stream_writer.hlocal_file_system_test_helper.hlocal_file_util_unittest.cc
media
device_media_async_file_util.hdevice_media_file_util.hfiltering_file_enumerator.ccmedia_path_filter.hmtp_device_map_service.h
mount_points.hnative_file_util.hnative_file_util_unittest.ccobfuscated_file_util.hobfuscated_file_util_unittest.ccsandbox_file_stream_writer.hsandbox_mount_point_provider.hsandbox_quota_observer.hsyncable
file_change.hlocal_file_change_tracker.hlocal_file_sync_context.hlocal_file_sync_context_unittest.ccsyncable_file_system_util.h
test_file_set.htest_mount_point_provider.hglue
dom_serializer_unittest.ccglue_serialize.hresource_loader_bridge.hresource_request_body_unittest.ccweb_intent_data.hweb_intent_reply_data.hwebfileutilities_impl.ccweburlloader_impl.cc
media
plugins
quota
support
platform_support_android.ccplatform_support_linux.ccplatform_support_win.ccsimple_database_system.hwebkit_support.ccweburl_loader_mock_factory.h
tools
win8
@ -10,7 +10,7 @@
|
||||
#include "android_webview/browser/aw_download_manager_delegate.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "components/visitedlink/browser/visitedlink_delegate.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "android_webview/browser/aw_browser_context.h"
|
||||
#include "android_webview/browser/aw_result_codes.h"
|
||||
#include "base/android/build_info.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "content/public/browser/android/compositor.h"
|
||||
#include "content/public/browser/content_browser_client.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "android_webview/browser/aw_download_manager_delegate.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "content/public/browser/download_danger_type.h"
|
||||
#include "content/public/browser/download_item.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "apps/app_host/update.h"
|
||||
#include "base/at_exit.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/process_util.h"
|
||||
#include "chrome/installer/launcher_support/chrome_launcher_support.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "ash/shell/content_client/shell_content_browser_client.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "ash/ash_export.h"
|
||||
#include "ash/system/power/power_supply_status.h"
|
||||
#include "ash/system/user/login_status.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/i18n/time_formatting.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/string16.h"
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/string16.h"
|
||||
#include "base/time.h"
|
||||
#include "base/win/scoped_com_initializer.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "ash/test/test_suite.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "build/build_config.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/memory/scoped_nsobject.h"
|
||||
#include "base/path_service.h"
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
#include "base/android/path_service_android.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/android/jni_android.h"
|
||||
#include "base/android/jni_string.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "jni/PathService_jni.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "base/android/jni_android.h"
|
||||
#include "base/android/jni_string.h"
|
||||
#include "base/android/scoped_java_ref.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
#include "jni/PathUtils_jni.h"
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/android/path_utils.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
@ -450,10 +450,10 @@
|
||||
'debug/trace_event_unittest.h',
|
||||
'debug/trace_event_win_unittest.cc',
|
||||
'environment_unittest.cc',
|
||||
'file_path_unittest.cc',
|
||||
'file_util_unittest.cc',
|
||||
'file_version_info_unittest.cc',
|
||||
'files/dir_reader_posix_unittest.cc',
|
||||
'files/file_path_unittest.cc',
|
||||
'files/file_util_proxy_unittest.cc',
|
||||
'files/important_file_writer_unittest.cc',
|
||||
'files/scoped_temp_dir_unittest.cc',
|
||||
|
@ -141,8 +141,6 @@
|
||||
'environment.cc',
|
||||
'environment.h',
|
||||
'file_descriptor_posix.h',
|
||||
'file_path.cc',
|
||||
'file_path.h',
|
||||
'file_util.cc',
|
||||
'file_util.h',
|
||||
'file_util_android.cc',
|
||||
@ -158,6 +156,8 @@
|
||||
'files/dir_reader_fallback.h',
|
||||
'files/dir_reader_linux.h',
|
||||
'files/dir_reader_posix.h',
|
||||
'files/file_path.cc',
|
||||
'files/file_path.h',
|
||||
'files/file_path_watcher.cc',
|
||||
'files/file_path_watcher.h',
|
||||
'files/file_path_watcher_kqueue.cc',
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "base/base_paths.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include "base/android/jni_android.h"
|
||||
#include "base/android/path_utils.h"
|
||||
#include "base/base_paths.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/process_util.h"
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/path_service.h"
|
||||
|
@ -11,13 +11,13 @@
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/environment.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/process_util.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_FREEBSD)
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include <shlobj.h>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/win/scoped_co_mem.h"
|
||||
#include "base/win/windows_version.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <ostream>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
||||
|
440
base/file_path.h
440
base/file_path.h
@ -2,441 +2,5 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// FilePath is a container for pathnames stored in a platform's native string
|
||||
// type, providing containers for manipulation in according with the
|
||||
// platform's conventions for pathnames. It supports the following path
|
||||
// types:
|
||||
//
|
||||
// POSIX Windows
|
||||
// --------------- ----------------------------------
|
||||
// Fundamental type char[] wchar_t[]
|
||||
// Encoding unspecified* UTF-16
|
||||
// Separator / \, tolerant of /
|
||||
// Drive letters no case-insensitive A-Z followed by :
|
||||
// Alternate root // (surprise!) \\, for UNC paths
|
||||
//
|
||||
// * The encoding need not be specified on POSIX systems, although some
|
||||
// POSIX-compliant systems do specify an encoding. Mac OS X uses UTF-8.
|
||||
// Chrome OS also uses UTF-8.
|
||||
// Linux does not specify an encoding, but in practice, the locale's
|
||||
// character set may be used.
|
||||
//
|
||||
// For more arcane bits of path trivia, see below.
|
||||
//
|
||||
// FilePath objects are intended to be used anywhere paths are. An
|
||||
// application may pass FilePath objects around internally, masking the
|
||||
// underlying differences between systems, only differing in implementation
|
||||
// where interfacing directly with the system. For example, a single
|
||||
// OpenFile(const FilePath &) function may be made available, allowing all
|
||||
// callers to operate without regard to the underlying implementation. On
|
||||
// POSIX-like platforms, OpenFile might wrap fopen, and on Windows, it might
|
||||
// wrap _wfopen_s, perhaps both by calling file_path.value().c_str(). This
|
||||
// allows each platform to pass pathnames around without requiring conversions
|
||||
// between encodings, which has an impact on performance, but more imporantly,
|
||||
// has an impact on correctness on platforms that do not have well-defined
|
||||
// encodings for pathnames.
|
||||
//
|
||||
// Several methods are available to perform common operations on a FilePath
|
||||
// object, such as determining the parent directory (DirName), isolating the
|
||||
// final path component (BaseName), and appending a relative pathname string
|
||||
// to an existing FilePath object (Append). These methods are highly
|
||||
// recommended over attempting to split and concatenate strings directly.
|
||||
// These methods are based purely on string manipulation and knowledge of
|
||||
// platform-specific pathname conventions, and do not consult the filesystem
|
||||
// at all, making them safe to use without fear of blocking on I/O operations.
|
||||
// These methods do not function as mutators but instead return distinct
|
||||
// instances of FilePath objects, and are therefore safe to use on const
|
||||
// objects. The objects themselves are safe to share between threads.
|
||||
//
|
||||
// To aid in initialization of FilePath objects from string literals, a
|
||||
// FILE_PATH_LITERAL macro is provided, which accounts for the difference
|
||||
// between char[]-based pathnames on POSIX systems and wchar_t[]-based
|
||||
// pathnames on Windows.
|
||||
//
|
||||
// Paths can't contain NULs as a precaution agaist premature truncation.
|
||||
//
|
||||
// Because a FilePath object should not be instantiated at the global scope,
|
||||
// instead, use a FilePath::CharType[] and initialize it with
|
||||
// FILE_PATH_LITERAL. At runtime, a FilePath object can be created from the
|
||||
// character array. Example:
|
||||
//
|
||||
// | const FilePath::CharType kLogFileName[] = FILE_PATH_LITERAL("log.txt");
|
||||
// |
|
||||
// | void Function() {
|
||||
// | FilePath log_file_path(kLogFileName);
|
||||
// | [...]
|
||||
// | }
|
||||
//
|
||||
// WARNING: FilePaths should ALWAYS be displayed with LTR directionality, even
|
||||
// when the UI language is RTL. This means you always need to pass filepaths
|
||||
// through base::i18n::WrapPathWithLTRFormatting() before displaying it in the
|
||||
// RTL UI.
|
||||
//
|
||||
// This is a very common source of bugs, please try to keep this in mind.
|
||||
//
|
||||
// ARCANE BITS OF PATH TRIVIA
|
||||
//
|
||||
// - A double leading slash is actually part of the POSIX standard. Systems
|
||||
// are allowed to treat // as an alternate root, as Windows does for UNC
|
||||
// (network share) paths. Most POSIX systems don't do anything special
|
||||
// with two leading slashes, but FilePath handles this case properly
|
||||
// in case it ever comes across such a system. FilePath needs this support
|
||||
// for Windows UNC paths, anyway.
|
||||
// References:
|
||||
// The Open Group Base Specifications Issue 7, sections 3.266 ("Pathname")
|
||||
// and 4.12 ("Pathname Resolution"), available at:
|
||||
// http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_266
|
||||
// http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12
|
||||
//
|
||||
// - Windows treats c:\\ the same way it treats \\. This was intended to
|
||||
// allow older applications that require drive letters to support UNC paths
|
||||
// like \\server\share\path, by permitting c:\\server\share\path as an
|
||||
// equivalent. Since the OS treats these paths specially, FilePath needs
|
||||
// to do the same. Since Windows can use either / or \ as the separator,
|
||||
// FilePath treats c://, c:\\, //, and \\ all equivalently.
|
||||
// Reference:
|
||||
// The Old New Thing, "Why is a drive letter permitted in front of UNC
|
||||
// paths (sometimes)?", available at:
|
||||
// http://blogs.msdn.com/oldnewthing/archive/2005/11/22/495740.aspx
|
||||
|
||||
#ifndef BASE_FILE_PATH_H_
|
||||
#define BASE_FILE_PATH_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/string16.h"
|
||||
#include "base/string_piece.h" // For implicit conversions.
|
||||
#include "build/build_config.h"
|
||||
|
||||
// Windows-style drive letter support and pathname separator characters can be
|
||||
// enabled and disabled independently, to aid testing. These #defines are
|
||||
// here so that the same setting can be used in both the implementation and
|
||||
// in the unit test.
|
||||
#if defined(OS_WIN)
|
||||
#define FILE_PATH_USES_DRIVE_LETTERS
|
||||
#define FILE_PATH_USES_WIN_SEPARATORS
|
||||
#endif // OS_WIN
|
||||
|
||||
class Pickle;
|
||||
class PickleIterator;
|
||||
|
||||
namespace base {
|
||||
|
||||
// An abstraction to isolate users from the differences between native
|
||||
// pathnames on different platforms.
|
||||
class BASE_EXPORT FilePath {
|
||||
public:
|
||||
#if defined(OS_POSIX)
|
||||
// On most platforms, native pathnames are char arrays, and the encoding
|
||||
// may or may not be specified. On Mac OS X, native pathnames are encoded
|
||||
// in UTF-8.
|
||||
typedef std::string StringType;
|
||||
#elif defined(OS_WIN)
|
||||
// On Windows, for Unicode-aware applications, native pathnames are wchar_t
|
||||
// arrays encoded in UTF-16.
|
||||
typedef std::wstring StringType;
|
||||
#endif // OS_WIN
|
||||
|
||||
typedef StringType::value_type CharType;
|
||||
|
||||
// Null-terminated array of separators used to separate components in
|
||||
// hierarchical paths. Each character in this array is a valid separator,
|
||||
// but kSeparators[0] is treated as the canonical separator and will be used
|
||||
// when composing pathnames.
|
||||
static const CharType kSeparators[];
|
||||
|
||||
// A special path component meaning "this directory."
|
||||
static const CharType kCurrentDirectory[];
|
||||
|
||||
// A special path component meaning "the parent directory."
|
||||
static const CharType kParentDirectory[];
|
||||
|
||||
// The character used to identify a file extension.
|
||||
static const CharType kExtensionSeparator;
|
||||
|
||||
FilePath();
|
||||
FilePath(const FilePath& that);
|
||||
explicit FilePath(const StringType& path);
|
||||
~FilePath();
|
||||
FilePath& operator=(const FilePath& that);
|
||||
|
||||
bool operator==(const FilePath& that) const;
|
||||
|
||||
bool operator!=(const FilePath& that) const;
|
||||
|
||||
// Required for some STL containers and operations
|
||||
bool operator<(const FilePath& that) const {
|
||||
return path_ < that.path_;
|
||||
}
|
||||
|
||||
const StringType& value() const { return path_; }
|
||||
|
||||
bool empty() const { return path_.empty(); }
|
||||
|
||||
void clear() { path_.clear(); }
|
||||
|
||||
// Returns true if |character| is in kSeparators.
|
||||
static bool IsSeparator(CharType character);
|
||||
|
||||
// Returns a vector of all of the components of the provided path. It is
|
||||
// equivalent to calling DirName().value() on the path's root component,
|
||||
// and BaseName().value() on each child component.
|
||||
void GetComponents(std::vector<FilePath::StringType>* components) const;
|
||||
|
||||
// Returns true if this FilePath is a strict parent of the |child|. Absolute
|
||||
// and relative paths are accepted i.e. is /foo parent to /foo/bar and
|
||||
// is foo parent to foo/bar. Does not convert paths to absolute, follow
|
||||
// symlinks or directory navigation (e.g. ".."). A path is *NOT* its own
|
||||
// parent.
|
||||
bool IsParent(const FilePath& child) const;
|
||||
|
||||
// If IsParent(child) holds, appends to path (if non-NULL) the
|
||||
// relative path to child and returns true. For example, if parent
|
||||
// holds "/Users/johndoe/Library/Application Support", child holds
|
||||
// "/Users/johndoe/Library/Application Support/Google/Chrome/Default", and
|
||||
// *path holds "/Users/johndoe/Library/Caches", then after
|
||||
// parent.AppendRelativePath(child, path) is called *path will hold
|
||||
// "/Users/johndoe/Library/Caches/Google/Chrome/Default". Otherwise,
|
||||
// returns false.
|
||||
bool AppendRelativePath(const FilePath& child, FilePath* path) const;
|
||||
|
||||
// Returns a FilePath corresponding to the directory containing the path
|
||||
// named by this object, stripping away the file component. If this object
|
||||
// only contains one component, returns a FilePath identifying
|
||||
// kCurrentDirectory. If this object already refers to the root directory,
|
||||
// returns a FilePath identifying the root directory.
|
||||
FilePath DirName() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns a FilePath corresponding to the last path component of this
|
||||
// object, either a file or a directory. If this object already refers to
|
||||
// the root directory, returns a FilePath identifying the root directory;
|
||||
// this is the only situation in which BaseName will return an absolute path.
|
||||
FilePath BaseName() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns ".jpg" for path "C:\pics\jojo.jpg", or an empty string if
|
||||
// the file has no extension. If non-empty, Extension() will always start
|
||||
// with precisely one ".". The following code should always work regardless
|
||||
// of the value of path.
|
||||
// new_path = path.RemoveExtension().value().append(path.Extension());
|
||||
// ASSERT(new_path == path.value());
|
||||
// NOTE: this is different from the original file_util implementation which
|
||||
// returned the extension without a leading "." ("jpg" instead of ".jpg")
|
||||
StringType Extension() const;
|
||||
|
||||
// Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
|
||||
// NOTE: this is slightly different from the similar file_util implementation
|
||||
// which returned simply 'jojo'.
|
||||
FilePath RemoveExtension() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Inserts |suffix| after the file name portion of |path| but before the
|
||||
// extension. Returns "" if BaseName() == "." or "..".
|
||||
// Examples:
|
||||
// path == "C:\pics\jojo.jpg" suffix == " (1)", returns "C:\pics\jojo (1).jpg"
|
||||
// path == "jojo.jpg" suffix == " (1)", returns "jojo (1).jpg"
|
||||
// path == "C:\pics\jojo" suffix == " (1)", returns "C:\pics\jojo (1)"
|
||||
// path == "C:\pics.old\jojo" suffix == " (1)", returns "C:\pics.old\jojo (1)"
|
||||
FilePath InsertBeforeExtension(
|
||||
const StringType& suffix) const WARN_UNUSED_RESULT;
|
||||
FilePath InsertBeforeExtensionASCII(
|
||||
const base::StringPiece& suffix) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Adds |extension| to |file_name|. Returns the current FilePath if
|
||||
// |extension| is empty. Returns "" if BaseName() == "." or "..".
|
||||
FilePath AddExtension(
|
||||
const StringType& extension) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Replaces the extension of |file_name| with |extension|. If |file_name|
|
||||
// does not have an extension, then |extension| is added. If |extension| is
|
||||
// empty, then the extension is removed from |file_name|.
|
||||
// Returns "" if BaseName() == "." or "..".
|
||||
FilePath ReplaceExtension(
|
||||
const StringType& extension) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if the file path matches the specified extension. The test is
|
||||
// case insensitive. Don't forget the leading period if appropriate.
|
||||
bool MatchesExtension(const StringType& extension) const;
|
||||
|
||||
// Returns a FilePath by appending a separator and the supplied path
|
||||
// component to this object's path. Append takes care to avoid adding
|
||||
// excessive separators if this object's path already ends with a separator.
|
||||
// If this object's path is kCurrentDirectory, a new FilePath corresponding
|
||||
// only to |component| is returned. |component| must be a relative path;
|
||||
// it is an error to pass an absolute path.
|
||||
FilePath Append(const StringType& component) const WARN_UNUSED_RESULT;
|
||||
FilePath Append(const FilePath& component) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Although Windows StringType is std::wstring, since the encoding it uses for
|
||||
// paths is well defined, it can handle ASCII path components as well.
|
||||
// Mac uses UTF8, and since ASCII is a subset of that, it works there as well.
|
||||
// On Linux, although it can use any 8-bit encoding for paths, we assume that
|
||||
// ASCII is a valid subset, regardless of the encoding, since many operating
|
||||
// system paths will always be ASCII.
|
||||
FilePath AppendASCII(const base::StringPiece& component)
|
||||
const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if this FilePath contains an absolute path. On Windows, an
|
||||
// absolute path begins with either a drive letter specification followed by
|
||||
// a separator character, or with two separator characters. On POSIX
|
||||
// platforms, an absolute path begins with a separator character.
|
||||
bool IsAbsolute() const;
|
||||
|
||||
// Returns a copy of this FilePath that does not end with a trailing
|
||||
// separator.
|
||||
FilePath StripTrailingSeparators() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if this FilePath contains any attempt to reference a parent
|
||||
// directory (i.e. has a path component that is ".."
|
||||
bool ReferencesParent() const;
|
||||
|
||||
// Return a Unicode human-readable version of this path.
|
||||
// Warning: you can *not*, in general, go from a display name back to a real
|
||||
// path. Only use this when displaying paths to users, not just when you
|
||||
// want to stuff a string16 into some other API.
|
||||
string16 LossyDisplayName() const;
|
||||
|
||||
// Return the path as ASCII, or the empty string if the path is not ASCII.
|
||||
// This should only be used for cases where the FilePath is representing a
|
||||
// known-ASCII filename.
|
||||
std::string MaybeAsASCII() const;
|
||||
|
||||
// Return the path as UTF-8.
|
||||
//
|
||||
// This function is *unsafe* as there is no way to tell what encoding is
|
||||
// used in file names on POSIX systems other than Mac and Chrome OS,
|
||||
// although UTF-8 is practically used everywhere these days. To mitigate
|
||||
// the encoding issue, this function internally calls
|
||||
// SysNativeMBToWide() on POSIX systems other than Mac and Chrome OS,
|
||||
// per assumption that the current locale's encoding is used in file
|
||||
// names, but this isn't a perfect solution.
|
||||
//
|
||||
// Once it becomes safe to to stop caring about non-UTF-8 file names,
|
||||
// the SysNativeMBToWide() hack will be removed from the code, along
|
||||
// with "Unsafe" in the function name.
|
||||
std::string AsUTF8Unsafe() const;
|
||||
|
||||
// Older Chromium code assumes that paths are always wstrings.
|
||||
// This function converts wstrings to FilePaths, and is
|
||||
// useful to smooth porting that old code to the FilePath API.
|
||||
// It has "Hack" its name so people feel bad about using it.
|
||||
// http://code.google.com/p/chromium/issues/detail?id=24672
|
||||
//
|
||||
// If you are trying to be a good citizen and remove these, ask yourself:
|
||||
// - Am I interacting with other Chrome code that deals with files? Then
|
||||
// try to convert the API into using FilePath.
|
||||
// - Am I interacting with OS-native calls? Then use value() to get at an
|
||||
// OS-native string format.
|
||||
// - Am I using well-known file names, like "config.ini"? Then use the
|
||||
// ASCII functions (we require paths to always be supersets of ASCII).
|
||||
// - Am I displaying a string to the user in some UI? Then use the
|
||||
// LossyDisplayName() function, but keep in mind that you can't
|
||||
// ever use the result of that again as a path.
|
||||
static FilePath FromWStringHack(const std::wstring& wstring);
|
||||
|
||||
// Returns a FilePath object from a path name in UTF-8. This function
|
||||
// should only be used for cases where you are sure that the input
|
||||
// string is UTF-8.
|
||||
//
|
||||
// Like AsUTF8Unsafe(), this function is unsafe. This function
|
||||
// internally calls SysWideToNativeMB() on POSIX systems other than Mac
|
||||
// and Chrome OS, to mitigate the encoding issue. See the comment at
|
||||
// AsUTF8Unsafe() for details.
|
||||
static FilePath FromUTF8Unsafe(const std::string& utf8);
|
||||
|
||||
void WriteToPickle(Pickle* pickle) const;
|
||||
bool ReadFromPickle(PickleIterator* iter);
|
||||
|
||||
// Normalize all path separators to backslash on Windows
|
||||
// (if FILE_PATH_USES_WIN_SEPARATORS is true), or do nothing on POSIX systems.
|
||||
FilePath NormalizePathSeparators() const;
|
||||
|
||||
// Compare two strings in the same way the file system does.
|
||||
// Note that these always ignore case, even on file systems that are case-
|
||||
// sensitive. If case-sensitive comparison is ever needed, add corresponding
|
||||
// methods here.
|
||||
// The methods are written as a static method so that they can also be used
|
||||
// on parts of a file path, e.g., just the extension.
|
||||
// CompareIgnoreCase() returns -1, 0 or 1 for less-than, equal-to and
|
||||
// greater-than respectively.
|
||||
static int CompareIgnoreCase(const StringType& string1,
|
||||
const StringType& string2);
|
||||
static bool CompareEqualIgnoreCase(const StringType& string1,
|
||||
const StringType& string2) {
|
||||
return CompareIgnoreCase(string1, string2) == 0;
|
||||
}
|
||||
static bool CompareLessIgnoreCase(const StringType& string1,
|
||||
const StringType& string2) {
|
||||
return CompareIgnoreCase(string1, string2) < 0;
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// Returns the string in the special canonical decomposed form as defined for
|
||||
// HFS, which is close to, but not quite, decomposition form D. See
|
||||
// http://developer.apple.com/mac/library/technotes/tn/tn1150.html#UnicodeSubtleties
|
||||
// for further comments.
|
||||
// Returns the epmty string if the conversion failed.
|
||||
static StringType GetHFSDecomposedForm(const FilePath::StringType& string);
|
||||
|
||||
// Special UTF-8 version of FastUnicodeCompare. Cf:
|
||||
// http://developer.apple.com/mac/library/technotes/tn/tn1150.html#StringComparisonAlgorithm
|
||||
// IMPORTANT: The input strings must be in the special HFS decomposed form!
|
||||
// (cf. above GetHFSDecomposedForm method)
|
||||
static int HFSFastUnicodeCompare(const StringType& string1,
|
||||
const StringType& string2);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Remove trailing separators from this object. If the path is absolute, it
|
||||
// will never be stripped any more than to refer to the absolute root
|
||||
// directory, so "////" will become "/", not "". A leading pair of
|
||||
// separators is never stripped, to support alternate roots. This is used to
|
||||
// support UNC paths on Windows.
|
||||
void StripTrailingSeparatorsInternal();
|
||||
|
||||
StringType path_;
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
// This is required by googletest to print a readable output on test failures.
|
||||
BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
|
||||
|
||||
// Macros for string literal initialization of FilePath::CharType[], and for
|
||||
// using a FilePath::CharType[] in a printf-style format string.
|
||||
#if defined(OS_POSIX)
|
||||
#define FILE_PATH_LITERAL(x) x
|
||||
#define PRFilePath "s"
|
||||
#define PRFilePathLiteral "%s"
|
||||
#elif defined(OS_WIN)
|
||||
#define FILE_PATH_LITERAL(x) L ## x
|
||||
#define PRFilePath "ls"
|
||||
#define PRFilePathLiteral L"%ls"
|
||||
#endif // OS_WIN
|
||||
|
||||
// Provide a hash function so that hash_sets and maps can contain FilePath
|
||||
// objects.
|
||||
namespace BASE_HASH_NAMESPACE {
|
||||
#if defined(COMPILER_GCC)
|
||||
|
||||
template<>
|
||||
struct hash<base::FilePath> {
|
||||
size_t operator()(const base::FilePath& f) const {
|
||||
return hash<base::FilePath::StringType>()(f.value());
|
||||
}
|
||||
};
|
||||
|
||||
#elif defined(COMPILER_MSVC)
|
||||
|
||||
inline size_t hash_value(const base::FilePath& f) {
|
||||
return hash_value(f.value());
|
||||
}
|
||||
|
||||
#endif // COMPILER
|
||||
|
||||
} // namespace BASE_HASH_NAMESPACE
|
||||
|
||||
#endif // BASE_FILE_PATH_H_
|
||||
// TODO(brettw) remove this file.
|
||||
#include "base/files/file_path.h"
|
||||
|
@ -11,11 +11,11 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/string_piece.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/stringprintf.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
|
||||
using base::FilePath;
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/platform_file.h"
|
||||
#include "base/string16.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/file_util.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
|
||||
namespace file_util {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/file_util.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/vfs.h>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <copyfile.h>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <fstream>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/memory/singleton.h"
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <set>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/test/test_file_util.h"
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/metrics/histogram.h"
|
||||
#include "base/process_util.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_version_info.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <algorithm>
|
442
base/files/file_path.h
Normal file
442
base/files/file_path.h
Normal file
@ -0,0 +1,442 @@
|
||||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// FilePath is a container for pathnames stored in a platform's native string
|
||||
// type, providing containers for manipulation in according with the
|
||||
// platform's conventions for pathnames. It supports the following path
|
||||
// types:
|
||||
//
|
||||
// POSIX Windows
|
||||
// --------------- ----------------------------------
|
||||
// Fundamental type char[] wchar_t[]
|
||||
// Encoding unspecified* UTF-16
|
||||
// Separator / \, tolerant of /
|
||||
// Drive letters no case-insensitive A-Z followed by :
|
||||
// Alternate root // (surprise!) \\, for UNC paths
|
||||
//
|
||||
// * The encoding need not be specified on POSIX systems, although some
|
||||
// POSIX-compliant systems do specify an encoding. Mac OS X uses UTF-8.
|
||||
// Chrome OS also uses UTF-8.
|
||||
// Linux does not specify an encoding, but in practice, the locale's
|
||||
// character set may be used.
|
||||
//
|
||||
// For more arcane bits of path trivia, see below.
|
||||
//
|
||||
// FilePath objects are intended to be used anywhere paths are. An
|
||||
// application may pass FilePath objects around internally, masking the
|
||||
// underlying differences between systems, only differing in implementation
|
||||
// where interfacing directly with the system. For example, a single
|
||||
// OpenFile(const FilePath &) function may be made available, allowing all
|
||||
// callers to operate without regard to the underlying implementation. On
|
||||
// POSIX-like platforms, OpenFile might wrap fopen, and on Windows, it might
|
||||
// wrap _wfopen_s, perhaps both by calling file_path.value().c_str(). This
|
||||
// allows each platform to pass pathnames around without requiring conversions
|
||||
// between encodings, which has an impact on performance, but more imporantly,
|
||||
// has an impact on correctness on platforms that do not have well-defined
|
||||
// encodings for pathnames.
|
||||
//
|
||||
// Several methods are available to perform common operations on a FilePath
|
||||
// object, such as determining the parent directory (DirName), isolating the
|
||||
// final path component (BaseName), and appending a relative pathname string
|
||||
// to an existing FilePath object (Append). These methods are highly
|
||||
// recommended over attempting to split and concatenate strings directly.
|
||||
// These methods are based purely on string manipulation and knowledge of
|
||||
// platform-specific pathname conventions, and do not consult the filesystem
|
||||
// at all, making them safe to use without fear of blocking on I/O operations.
|
||||
// These methods do not function as mutators but instead return distinct
|
||||
// instances of FilePath objects, and are therefore safe to use on const
|
||||
// objects. The objects themselves are safe to share between threads.
|
||||
//
|
||||
// To aid in initialization of FilePath objects from string literals, a
|
||||
// FILE_PATH_LITERAL macro is provided, which accounts for the difference
|
||||
// between char[]-based pathnames on POSIX systems and wchar_t[]-based
|
||||
// pathnames on Windows.
|
||||
//
|
||||
// Paths can't contain NULs as a precaution agaist premature truncation.
|
||||
//
|
||||
// Because a FilePath object should not be instantiated at the global scope,
|
||||
// instead, use a FilePath::CharType[] and initialize it with
|
||||
// FILE_PATH_LITERAL. At runtime, a FilePath object can be created from the
|
||||
// character array. Example:
|
||||
//
|
||||
// | const FilePath::CharType kLogFileName[] = FILE_PATH_LITERAL("log.txt");
|
||||
// |
|
||||
// | void Function() {
|
||||
// | FilePath log_file_path(kLogFileName);
|
||||
// | [...]
|
||||
// | }
|
||||
//
|
||||
// WARNING: FilePaths should ALWAYS be displayed with LTR directionality, even
|
||||
// when the UI language is RTL. This means you always need to pass filepaths
|
||||
// through base::i18n::WrapPathWithLTRFormatting() before displaying it in the
|
||||
// RTL UI.
|
||||
//
|
||||
// This is a very common source of bugs, please try to keep this in mind.
|
||||
//
|
||||
// ARCANE BITS OF PATH TRIVIA
|
||||
//
|
||||
// - A double leading slash is actually part of the POSIX standard. Systems
|
||||
// are allowed to treat // as an alternate root, as Windows does for UNC
|
||||
// (network share) paths. Most POSIX systems don't do anything special
|
||||
// with two leading slashes, but FilePath handles this case properly
|
||||
// in case it ever comes across such a system. FilePath needs this support
|
||||
// for Windows UNC paths, anyway.
|
||||
// References:
|
||||
// The Open Group Base Specifications Issue 7, sections 3.266 ("Pathname")
|
||||
// and 4.12 ("Pathname Resolution"), available at:
|
||||
// http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_266
|
||||
// http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_12
|
||||
//
|
||||
// - Windows treats c:\\ the same way it treats \\. This was intended to
|
||||
// allow older applications that require drive letters to support UNC paths
|
||||
// like \\server\share\path, by permitting c:\\server\share\path as an
|
||||
// equivalent. Since the OS treats these paths specially, FilePath needs
|
||||
// to do the same. Since Windows can use either / or \ as the separator,
|
||||
// FilePath treats c://, c:\\, //, and \\ all equivalently.
|
||||
// Reference:
|
||||
// The Old New Thing, "Why is a drive letter permitted in front of UNC
|
||||
// paths (sometimes)?", available at:
|
||||
// http://blogs.msdn.com/oldnewthing/archive/2005/11/22/495740.aspx
|
||||
|
||||
#ifndef BASE_FILES_FILE_PATH_H_
|
||||
#define BASE_FILES_FILE_PATH_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/string16.h"
|
||||
#include "base/string_piece.h" // For implicit conversions.
|
||||
#include "build/build_config.h"
|
||||
|
||||
// Windows-style drive letter support and pathname separator characters can be
|
||||
// enabled and disabled independently, to aid testing. These #defines are
|
||||
// here so that the same setting can be used in both the implementation and
|
||||
// in the unit test.
|
||||
#if defined(OS_WIN)
|
||||
#define FILE_PATH_USES_DRIVE_LETTERS
|
||||
#define FILE_PATH_USES_WIN_SEPARATORS
|
||||
#endif // OS_WIN
|
||||
|
||||
class Pickle;
|
||||
class PickleIterator;
|
||||
|
||||
namespace base {
|
||||
|
||||
// An abstraction to isolate users from the differences between native
|
||||
// pathnames on different platforms.
|
||||
class BASE_EXPORT FilePath {
|
||||
public:
|
||||
#if defined(OS_POSIX)
|
||||
// On most platforms, native pathnames are char arrays, and the encoding
|
||||
// may or may not be specified. On Mac OS X, native pathnames are encoded
|
||||
// in UTF-8.
|
||||
typedef std::string StringType;
|
||||
#elif defined(OS_WIN)
|
||||
// On Windows, for Unicode-aware applications, native pathnames are wchar_t
|
||||
// arrays encoded in UTF-16.
|
||||
typedef std::wstring StringType;
|
||||
#endif // OS_WIN
|
||||
|
||||
typedef StringType::value_type CharType;
|
||||
|
||||
// Null-terminated array of separators used to separate components in
|
||||
// hierarchical paths. Each character in this array is a valid separator,
|
||||
// but kSeparators[0] is treated as the canonical separator and will be used
|
||||
// when composing pathnames.
|
||||
static const CharType kSeparators[];
|
||||
|
||||
// A special path component meaning "this directory."
|
||||
static const CharType kCurrentDirectory[];
|
||||
|
||||
// A special path component meaning "the parent directory."
|
||||
static const CharType kParentDirectory[];
|
||||
|
||||
// The character used to identify a file extension.
|
||||
static const CharType kExtensionSeparator;
|
||||
|
||||
FilePath();
|
||||
FilePath(const FilePath& that);
|
||||
explicit FilePath(const StringType& path);
|
||||
~FilePath();
|
||||
FilePath& operator=(const FilePath& that);
|
||||
|
||||
bool operator==(const FilePath& that) const;
|
||||
|
||||
bool operator!=(const FilePath& that) const;
|
||||
|
||||
// Required for some STL containers and operations
|
||||
bool operator<(const FilePath& that) const {
|
||||
return path_ < that.path_;
|
||||
}
|
||||
|
||||
const StringType& value() const { return path_; }
|
||||
|
||||
bool empty() const { return path_.empty(); }
|
||||
|
||||
void clear() { path_.clear(); }
|
||||
|
||||
// Returns true if |character| is in kSeparators.
|
||||
static bool IsSeparator(CharType character);
|
||||
|
||||
// Returns a vector of all of the components of the provided path. It is
|
||||
// equivalent to calling DirName().value() on the path's root component,
|
||||
// and BaseName().value() on each child component.
|
||||
void GetComponents(std::vector<FilePath::StringType>* components) const;
|
||||
|
||||
// Returns true if this FilePath is a strict parent of the |child|. Absolute
|
||||
// and relative paths are accepted i.e. is /foo parent to /foo/bar and
|
||||
// is foo parent to foo/bar. Does not convert paths to absolute, follow
|
||||
// symlinks or directory navigation (e.g. ".."). A path is *NOT* its own
|
||||
// parent.
|
||||
bool IsParent(const FilePath& child) const;
|
||||
|
||||
// If IsParent(child) holds, appends to path (if non-NULL) the
|
||||
// relative path to child and returns true. For example, if parent
|
||||
// holds "/Users/johndoe/Library/Application Support", child holds
|
||||
// "/Users/johndoe/Library/Application Support/Google/Chrome/Default", and
|
||||
// *path holds "/Users/johndoe/Library/Caches", then after
|
||||
// parent.AppendRelativePath(child, path) is called *path will hold
|
||||
// "/Users/johndoe/Library/Caches/Google/Chrome/Default". Otherwise,
|
||||
// returns false.
|
||||
bool AppendRelativePath(const FilePath& child, FilePath* path) const;
|
||||
|
||||
// Returns a FilePath corresponding to the directory containing the path
|
||||
// named by this object, stripping away the file component. If this object
|
||||
// only contains one component, returns a FilePath identifying
|
||||
// kCurrentDirectory. If this object already refers to the root directory,
|
||||
// returns a FilePath identifying the root directory.
|
||||
FilePath DirName() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns a FilePath corresponding to the last path component of this
|
||||
// object, either a file or a directory. If this object already refers to
|
||||
// the root directory, returns a FilePath identifying the root directory;
|
||||
// this is the only situation in which BaseName will return an absolute path.
|
||||
FilePath BaseName() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns ".jpg" for path "C:\pics\jojo.jpg", or an empty string if
|
||||
// the file has no extension. If non-empty, Extension() will always start
|
||||
// with precisely one ".". The following code should always work regardless
|
||||
// of the value of path.
|
||||
// new_path = path.RemoveExtension().value().append(path.Extension());
|
||||
// ASSERT(new_path == path.value());
|
||||
// NOTE: this is different from the original file_util implementation which
|
||||
// returned the extension without a leading "." ("jpg" instead of ".jpg")
|
||||
StringType Extension() const;
|
||||
|
||||
// Returns "C:\pics\jojo" for path "C:\pics\jojo.jpg"
|
||||
// NOTE: this is slightly different from the similar file_util implementation
|
||||
// which returned simply 'jojo'.
|
||||
FilePath RemoveExtension() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Inserts |suffix| after the file name portion of |path| but before the
|
||||
// extension. Returns "" if BaseName() == "." or "..".
|
||||
// Examples:
|
||||
// path == "C:\pics\jojo.jpg" suffix == " (1)", returns "C:\pics\jojo (1).jpg"
|
||||
// path == "jojo.jpg" suffix == " (1)", returns "jojo (1).jpg"
|
||||
// path == "C:\pics\jojo" suffix == " (1)", returns "C:\pics\jojo (1)"
|
||||
// path == "C:\pics.old\jojo" suffix == " (1)", returns "C:\pics.old\jojo (1)"
|
||||
FilePath InsertBeforeExtension(
|
||||
const StringType& suffix) const WARN_UNUSED_RESULT;
|
||||
FilePath InsertBeforeExtensionASCII(
|
||||
const base::StringPiece& suffix) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Adds |extension| to |file_name|. Returns the current FilePath if
|
||||
// |extension| is empty. Returns "" if BaseName() == "." or "..".
|
||||
FilePath AddExtension(
|
||||
const StringType& extension) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Replaces the extension of |file_name| with |extension|. If |file_name|
|
||||
// does not have an extension, then |extension| is added. If |extension| is
|
||||
// empty, then the extension is removed from |file_name|.
|
||||
// Returns "" if BaseName() == "." or "..".
|
||||
FilePath ReplaceExtension(
|
||||
const StringType& extension) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if the file path matches the specified extension. The test is
|
||||
// case insensitive. Don't forget the leading period if appropriate.
|
||||
bool MatchesExtension(const StringType& extension) const;
|
||||
|
||||
// Returns a FilePath by appending a separator and the supplied path
|
||||
// component to this object's path. Append takes care to avoid adding
|
||||
// excessive separators if this object's path already ends with a separator.
|
||||
// If this object's path is kCurrentDirectory, a new FilePath corresponding
|
||||
// only to |component| is returned. |component| must be a relative path;
|
||||
// it is an error to pass an absolute path.
|
||||
FilePath Append(const StringType& component) const WARN_UNUSED_RESULT;
|
||||
FilePath Append(const FilePath& component) const WARN_UNUSED_RESULT;
|
||||
|
||||
// Although Windows StringType is std::wstring, since the encoding it uses for
|
||||
// paths is well defined, it can handle ASCII path components as well.
|
||||
// Mac uses UTF8, and since ASCII is a subset of that, it works there as well.
|
||||
// On Linux, although it can use any 8-bit encoding for paths, we assume that
|
||||
// ASCII is a valid subset, regardless of the encoding, since many operating
|
||||
// system paths will always be ASCII.
|
||||
FilePath AppendASCII(const base::StringPiece& component)
|
||||
const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if this FilePath contains an absolute path. On Windows, an
|
||||
// absolute path begins with either a drive letter specification followed by
|
||||
// a separator character, or with two separator characters. On POSIX
|
||||
// platforms, an absolute path begins with a separator character.
|
||||
bool IsAbsolute() const;
|
||||
|
||||
// Returns a copy of this FilePath that does not end with a trailing
|
||||
// separator.
|
||||
FilePath StripTrailingSeparators() const WARN_UNUSED_RESULT;
|
||||
|
||||
// Returns true if this FilePath contains any attempt to reference a parent
|
||||
// directory (i.e. has a path component that is ".."
|
||||
bool ReferencesParent() const;
|
||||
|
||||
// Return a Unicode human-readable version of this path.
|
||||
// Warning: you can *not*, in general, go from a display name back to a real
|
||||
// path. Only use this when displaying paths to users, not just when you
|
||||
// want to stuff a string16 into some other API.
|
||||
string16 LossyDisplayName() const;
|
||||
|
||||
// Return the path as ASCII, or the empty string if the path is not ASCII.
|
||||
// This should only be used for cases where the FilePath is representing a
|
||||
// known-ASCII filename.
|
||||
std::string MaybeAsASCII() const;
|
||||
|
||||
// Return the path as UTF-8.
|
||||
//
|
||||
// This function is *unsafe* as there is no way to tell what encoding is
|
||||
// used in file names on POSIX systems other than Mac and Chrome OS,
|
||||
// although UTF-8 is practically used everywhere these days. To mitigate
|
||||
// the encoding issue, this function internally calls
|
||||
// SysNativeMBToWide() on POSIX systems other than Mac and Chrome OS,
|
||||
// per assumption that the current locale's encoding is used in file
|
||||
// names, but this isn't a perfect solution.
|
||||
//
|
||||
// Once it becomes safe to to stop caring about non-UTF-8 file names,
|
||||
// the SysNativeMBToWide() hack will be removed from the code, along
|
||||
// with "Unsafe" in the function name.
|
||||
std::string AsUTF8Unsafe() const;
|
||||
|
||||
// Older Chromium code assumes that paths are always wstrings.
|
||||
// This function converts wstrings to FilePaths, and is
|
||||
// useful to smooth porting that old code to the FilePath API.
|
||||
// It has "Hack" its name so people feel bad about using it.
|
||||
// http://code.google.com/p/chromium/issues/detail?id=24672
|
||||
//
|
||||
// If you are trying to be a good citizen and remove these, ask yourself:
|
||||
// - Am I interacting with other Chrome code that deals with files? Then
|
||||
// try to convert the API into using FilePath.
|
||||
// - Am I interacting with OS-native calls? Then use value() to get at an
|
||||
// OS-native string format.
|
||||
// - Am I using well-known file names, like "config.ini"? Then use the
|
||||
// ASCII functions (we require paths to always be supersets of ASCII).
|
||||
// - Am I displaying a string to the user in some UI? Then use the
|
||||
// LossyDisplayName() function, but keep in mind that you can't
|
||||
// ever use the result of that again as a path.
|
||||
static FilePath FromWStringHack(const std::wstring& wstring);
|
||||
|
||||
// Returns a FilePath object from a path name in UTF-8. This function
|
||||
// should only be used for cases where you are sure that the input
|
||||
// string is UTF-8.
|
||||
//
|
||||
// Like AsUTF8Unsafe(), this function is unsafe. This function
|
||||
// internally calls SysWideToNativeMB() on POSIX systems other than Mac
|
||||
// and Chrome OS, to mitigate the encoding issue. See the comment at
|
||||
// AsUTF8Unsafe() for details.
|
||||
static FilePath FromUTF8Unsafe(const std::string& utf8);
|
||||
|
||||
void WriteToPickle(Pickle* pickle) const;
|
||||
bool ReadFromPickle(PickleIterator* iter);
|
||||
|
||||
// Normalize all path separators to backslash on Windows
|
||||
// (if FILE_PATH_USES_WIN_SEPARATORS is true), or do nothing on POSIX systems.
|
||||
FilePath NormalizePathSeparators() const;
|
||||
|
||||
// Compare two strings in the same way the file system does.
|
||||
// Note that these always ignore case, even on file systems that are case-
|
||||
// sensitive. If case-sensitive comparison is ever needed, add corresponding
|
||||
// methods here.
|
||||
// The methods are written as a static method so that they can also be used
|
||||
// on parts of a file path, e.g., just the extension.
|
||||
// CompareIgnoreCase() returns -1, 0 or 1 for less-than, equal-to and
|
||||
// greater-than respectively.
|
||||
static int CompareIgnoreCase(const StringType& string1,
|
||||
const StringType& string2);
|
||||
static bool CompareEqualIgnoreCase(const StringType& string1,
|
||||
const StringType& string2) {
|
||||
return CompareIgnoreCase(string1, string2) == 0;
|
||||
}
|
||||
static bool CompareLessIgnoreCase(const StringType& string1,
|
||||
const StringType& string2) {
|
||||
return CompareIgnoreCase(string1, string2) < 0;
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
// Returns the string in the special canonical decomposed form as defined for
|
||||
// HFS, which is close to, but not quite, decomposition form D. See
|
||||
// http://developer.apple.com/mac/library/technotes/tn/tn1150.html#UnicodeSubtleties
|
||||
// for further comments.
|
||||
// Returns the epmty string if the conversion failed.
|
||||
static StringType GetHFSDecomposedForm(const FilePath::StringType& string);
|
||||
|
||||
// Special UTF-8 version of FastUnicodeCompare. Cf:
|
||||
// http://developer.apple.com/mac/library/technotes/tn/tn1150.html#StringComparisonAlgorithm
|
||||
// IMPORTANT: The input strings must be in the special HFS decomposed form!
|
||||
// (cf. above GetHFSDecomposedForm method)
|
||||
static int HFSFastUnicodeCompare(const StringType& string1,
|
||||
const StringType& string2);
|
||||
#endif
|
||||
|
||||
private:
|
||||
// Remove trailing separators from this object. If the path is absolute, it
|
||||
// will never be stripped any more than to refer to the absolute root
|
||||
// directory, so "////" will become "/", not "". A leading pair of
|
||||
// separators is never stripped, to support alternate roots. This is used to
|
||||
// support UNC paths on Windows.
|
||||
void StripTrailingSeparatorsInternal();
|
||||
|
||||
StringType path_;
|
||||
};
|
||||
|
||||
} // namespace base
|
||||
|
||||
// This is required by googletest to print a readable output on test failures.
|
||||
BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
|
||||
|
||||
// Macros for string literal initialization of FilePath::CharType[], and for
|
||||
// using a FilePath::CharType[] in a printf-style format string.
|
||||
#if defined(OS_POSIX)
|
||||
#define FILE_PATH_LITERAL(x) x
|
||||
#define PRFilePath "s"
|
||||
#define PRFilePathLiteral "%s"
|
||||
#elif defined(OS_WIN)
|
||||
#define FILE_PATH_LITERAL(x) L ## x
|
||||
#define PRFilePath "ls"
|
||||
#define PRFilePathLiteral L"%ls"
|
||||
#endif // OS_WIN
|
||||
|
||||
// Provide a hash function so that hash_sets and maps can contain FilePath
|
||||
// objects.
|
||||
namespace BASE_HASH_NAMESPACE {
|
||||
#if defined(COMPILER_GCC)
|
||||
|
||||
template<>
|
||||
struct hash<base::FilePath> {
|
||||
size_t operator()(const base::FilePath& f) const {
|
||||
return hash<base::FilePath::StringType>()(f.value());
|
||||
}
|
||||
};
|
||||
|
||||
#elif defined(COMPILER_MSVC)
|
||||
|
||||
inline size_t hash_value(const base::FilePath& f) {
|
||||
return hash_value(f.value());
|
||||
}
|
||||
|
||||
#endif // COMPILER
|
||||
|
||||
} // namespace BASE_HASH_NAMESPACE
|
||||
|
||||
#endif // BASE_FILES_FILE_PATH_H_
|
@ -3,8 +3,8 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "testing/platform_test.h"
|
@ -10,7 +10,7 @@
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/callback.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/message_loop_proxy.h"
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include "base/bind.h"
|
||||
#include "base/bind_helpers.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/message_loop_proxy.h"
|
||||
|
@ -17,8 +17,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/location.h"
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "base/files/file_path_watcher.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/message_loop_proxy.h"
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/platform_file.h"
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/critical_closure.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/task_runner.h"
|
||||
#include "base/metrics/histogram.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/task_runner.h"
|
||||
#include "base/threading/thread.h"
|
||||
#include "base/time.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/threading/non_thread_safe.h"
|
||||
#include "base/time.h"
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "base/files/important_file_writer.h"
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
// intervening calls to Delete or Take, or the calls will fail.
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
namespace base {
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "base/i18n/file_util_icu.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/i18n/icu_string_conversions.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// File utilities that use the ICU library go in this file.
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/i18n/base_i18n_export.h"
|
||||
#include "base/string16.h"
|
||||
|
||||
|
@ -12,8 +12,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/string_util.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/i18n/rtl.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/values.h"
|
||||
|
||||
class BASE_EXPORT JSONFileValueSerializer : public base::ValueSerializer {
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/values.h"
|
||||
|
||||
class BASE_EXPORT JSONStringValueSerializer : public base::ValueSerializer {
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define BASE_MAC_BUNDLE_LOCATIONS_H_
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
#if defined(__OBJC__)
|
||||
#import <Foundation/Foundation.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/mac_logging.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "base/mac/foundation_util.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/xattr.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include "base/mac/mac_util.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/mac/scoped_cftyperef.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/environment.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/third_party/xdg_user_dirs/xdg_user_dir_lookup.h"
|
||||
|
||||
namespace {
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/hash_tables.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "base/path_service.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/string_util.h"
|
||||
#include "build/build_config.h"
|
||||
|
@ -8,8 +8,8 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
|
||||
static FILE* perf_log_file = NULL;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/time.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/platform_file.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/important_file_writer.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/message_loop_proxy.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/prefs/pref_registry_simple.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/string_number_conversions.h"
|
||||
#include "base/values.h"
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/message_loop.h"
|
||||
#include "base/metrics/histogram.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "base/basictypes.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/callback_forward.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ref_counted.h"
|
||||
#include "base/message_loop_proxy.h"
|
||||
|
@ -37,7 +37,7 @@ typedef struct _malloc_zone_t malloc_zone_t;
|
||||
#include <vector>
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/process.h"
|
||||
|
||||
#if defined(OS_POSIX)
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/alias.h"
|
||||
#include "base/debug/stack_trace.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/path_service.h"
|
||||
@ -25,13 +25,13 @@
|
||||
#include "testing/multiprocess_func_list.h"
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
#include <malloc.h>
|
||||
#include <glib.h>
|
||||
#include <malloc.h>
|
||||
#include <sched.h>
|
||||
#endif
|
||||
#if defined(OS_POSIX)
|
||||
#include <errno.h>
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <signal.h>
|
||||
#include <sys/resource.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/scoped_native_library.h"
|
||||
#if defined(OS_WIN)
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#endif
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -5,8 +5,8 @@
|
||||
#include "base/sys_info.h"
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/string_piece.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "base/stringprintf.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/debugger.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/perftimer.h"
|
||||
#include "base/process_util.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
namespace base {
|
||||
class FilePath;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
namespace file_util {
|
||||
|
||||
|
@ -11,8 +11,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/string_util.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
#include "base/test/test_file_util.h"
|
||||
|
||||
#include <windows.h>
|
||||
#include <aclapi.h>
|
||||
#include <shlwapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <shlobj.h>
|
||||
#include <propkey.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/string16.h"
|
||||
#include "base/utf_string_conversions.h"
|
||||
#include "base/win/scoped_comptr.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef BASE_TEST_TEST_SHORTCUT_WIN_H_
|
||||
#define BASE_TEST_TEST_SHORTCUT_WIN_H_
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/win/shortcut.h"
|
||||
|
||||
// Windows shortcut functions used only by tests.
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "base/debug/debug_on_start_win.h"
|
||||
#include "base/debug/debugger.h"
|
||||
#include "base/debug/stack_trace.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "base/android/path_utils.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/singleton.h"
|
||||
#include "base/message_loop.h"
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "base/value_conversions.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/time.h"
|
||||
#include "base/values.h"
|
||||
|
@ -10,8 +10,8 @@
|
||||
#include <objbase.h>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/process.h"
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include <objbase.h>
|
||||
#include <initguid.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/process.h"
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "base/base_export.h"
|
||||
#include "base/callback.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/string16.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -7,8 +7,8 @@
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/string16.h"
|
||||
|
||||
namespace base {
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/files/scoped_temp_dir.h"
|
||||
#include "base/test/test_file_util.h"
|
||||
#include "base/test/test_shortcut_win.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "cc/layer_tree_host.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/string_piece.h"
|
||||
#include "cc/content_layer.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
#include "cc/test/paths.h"
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/path_service.h"
|
||||
|
||||
namespace cc {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef CC_TEST_PIXEL_TEST_UTILS_H_
|
||||
#define CC_TEST_PIXEL_TEST_UTILS_H_
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
|
||||
class SkBitmap;
|
||||
|
||||
|
@ -13,8 +13,8 @@
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.h"
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/uio.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/linux_util.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/platform_file.h"
|
||||
|
@ -12,8 +12,8 @@
|
||||
#import "base/basictypes.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/crash_logging.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/file_util.h"
|
||||
#include "base/files/file_path.h"
|
||||
#import "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/mac_util.h"
|
||||
|
@ -8,7 +8,7 @@
|
||||
// those app bundles.
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/foundation_util.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#import "base/mac/bundle_locations.h"
|
||||
#import "base/mac/foundation_util.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "base/basictypes.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/posix/eintr_wrapper.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "base/file_path.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/platform_file.h"
|
||||
#include "base/process.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user