Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2356)

Unified Diff: chrome/browser/resources/file_manager/common/js/path_util.js

Issue 247123002: Move Files.app files to ui/file_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the test failure on non-chromeos Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/common/js/path_util.js
diff --git a/chrome/browser/resources/file_manager/common/js/path_util.js b/chrome/browser/resources/file_manager/common/js/path_util.js
deleted file mode 100644
index e55aad8d761b511b6a24bd81db19f73a244922ba..0000000000000000000000000000000000000000
--- a/chrome/browser/resources/file_manager/common/js/path_util.js
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.
-
-'use strict';
-
-/**
- * Type of a root directory.
- * @enum {string}
- * @const
- */
-var RootType = Object.freeze({
- // Root of local directory.
- DOWNLOADS: 'downloads',
-
- // Root of mounted archive file.
- ARCHIVE: 'archive',
-
- // Root of removal volume.
- REMOVABLE: 'removable',
-
- // Root of drive directory.
- DRIVE: 'drive',
-
- // Root for privet storage volume.
- CLOUD_DEVICE: 'cloud_device',
-
- // Root for MTP device.
- MTP: 'mtp',
-
- // Root for entries that is not located under RootType.DRIVE. e.g. shared
- // files.
- DRIVE_OTHER: 'drive_other',
-
- // Fake root for offline available files on the drive.
- DRIVE_OFFLINE: 'drive_offline',
-
- // Fake root for shared files on the drive.
- DRIVE_SHARED_WITH_ME: 'drive_shared_with_me',
-
- // Fake root for recent files on the drive.
- DRIVE_RECENT: 'drive_recent'
-});
-
-var PathUtil = {};
-
-/**
- * Extracts the extension of the path.
- *
- * Examples:
- * PathUtil.splitExtension('abc.ext') -> ['abc', '.ext']
- * PathUtil.splitExtension('a/b/abc.ext') -> ['a/b/abc', '.ext']
- * PathUtil.splitExtension('a/b') -> ['a/b', '']
- * PathUtil.splitExtension('.cshrc') -> ['', '.cshrc']
- * PathUtil.splitExtension('a/b.backup/hoge') -> ['a/b.backup/hoge', '']
- *
- * @param {string} path Path to be extracted.
- * @return {Array.<string>} Filename and extension of the given path.
- */
-PathUtil.splitExtension = function(path) {
- var dotPosition = path.lastIndexOf('.');
- if (dotPosition <= path.lastIndexOf('/'))
- dotPosition = -1;
-
- var filename = dotPosition != -1 ? path.substr(0, dotPosition) : path;
- var extension = dotPosition != -1 ? path.substr(dotPosition) : '';
- return [filename, extension];
-};

Powered by Google App Engine
This is Rietveld 408576698