Home | History | Annotate | Download | only in base

Lines Matching refs:pathname

43 // Pathname - parsing of pathnames into components, and vice versa
46 bool Pathname::IsFolderDelimiter(char ch) {
50 char Pathname::DefaultFolderDelimiter() {
54 Pathname::Pathname()
58 Pathname::Pathname(const std::string& pathname)
60 SetPathname(pathname);
63 Pathname::Pathname(const std::string& folder, const std::string& filename)
68 void Pathname::SetFolderDelimiter(char delimiter) {
73 void Pathname::Normalize() {
81 void Pathname::clear() {
87 bool Pathname::empty() const {
91 std::string Pathname::pathname() const {
92 std::string pathname(folder_);
93 pathname.append(basename_);
94 pathname.append(extension_);
95 if (pathname.empty()) {
96 // Instead of the empty pathname, return the current working directory.
97 pathname.push_back('.');
98 pathname.push_back(folder_delimiter_);
100 return pathname;
103 std::string Pathname::url() const {
116 void Pathname::SetPathname(const std::string& pathname) {
117 std::string::size_type pos = pathname.find_last_of(FOLDER_DELIMS);
119 SetFolder(pathname.substr(0, pos + 1));
120 SetFilename(pathname.substr(pos + 1));
123 SetFilename(pathname);
127 void Pathname::SetPathname(const std::string& folder,
133 void Pathname::AppendPathname(const std::string& pathname) {
135 full_pathname.append(pathname);
139 std::string Pathname::folder() const {
143 std::string Pathname::folder_name() const {
155 std::string Pathname::parent_folder() const {
167 void Pathname::SetFolder(const std::string& folder) {
175 void Pathname::AppendFolder(const std::string& folder) {
183 std::string Pathname::basename() const {
187 bool Pathname::SetBasename(const std::string& basename) {
195 std::string Pathname::extension() const {
199 bool Pathname::SetExtension(const std::string& extension) {
212 std::string Pathname::filename() const {
218 bool Pathname::SetFilename(const std::string& filename) {
228 bool Pathname::GetDrive(char* drive, uint32_t bytes) const {
233 bool Pathname::GetDrive(char* drive,
235 const std::string& pathname) {
237 if (bytes < 4 || pathname.size() < 3) {
241 memcpy(drive, pathname.c_str(), 3);