Lines Matching defs:path

58     // path to primary storage
185 String path = subDirectories[i];
186 mSubDirectoriesWhereArgs[j++] = path;
187 mSubDirectoriesWhereArgs[j++] = path + "/%";
276 // check to see if the path is contained in one of our storage subdirectories
278 private boolean inStorageSubDirectory(String path) {
280 if (path == null) return false;
283 int pathLength = path.length();
288 path.charAt(subdirLength) == '/' &&
289 path.startsWith(subdir)) {
296 // check to see if the path matches one of our storage subdirectories
298 private boolean isStorageSubDirectory(String path) {
301 if (path.equals(mSubDirectories[i])) {
308 // returns true if the path is in the storage root
309 private boolean inStorageRoot(String path) {
311 File f = new File(path);
324 private int beginSendObject(String path, int format, int parent,
326 // if the path is outside of the storage root, do not allow access
327 if (!inStorageRoot(path)) {
328 Log.e(TAG, "attempt to put file outside of storage area: " + path);
332 if (!inStorageSubDirectory(path)) return -1;
335 if (path != null) {
339 new String[] { path }, null, null);
341 Log.w(TAG, "file already exists in beginSendObject: " + path);
355 values.put(Files.FileColumns.DATA, path);
375 private void endSendObject(String path, int handle, int format, boolean succeeded) {
380 // extract name from path
381 String name = path;
392 values.put(Audio.Playlists.DATA, path);
404 mMediaScanner.scanMtpFile(path, mVolumeName, handle, format);
745 // first compute current path
746 String path = null;
752 path = c.getString(1);
762 if (path == null) {
767 if (isStorageSubDirectory(path)) {
772 File oldFile = new File(path);
773 int lastSlash = path.lastIndexOf('/');
777 String newPath = path.substring(0, lastSlash + 1) + newName;
781 Log.w(TAG, "renaming "+ path + " to " + newPath + " failed");
797 Log.e(TAG, "Unable to update path for " + path + " to " + newPath);
897 // extract name from path
898 String path = c.getString(4);
899 int lastSlash = path.lastIndexOf('/');
901 int end = path.length();
905 path.getChars(start, end, outName, 0);
940 String path = c.getString(1);
941 path.getChars(0, path.length(), outFilePath, 0);
942 outFilePath[path.length()] = 0;
945 outFileLengthFormat[0] = new File(path).length();
983 String path = null;
991 // don't convert to media path here, since we will be matching
993 path = c.getString(1);
999 if (path == null || format == 0) {
1004 if (isStorageSubDirectory(path)) {
1013 // when the path contains sqlite wildcard characters
1015 new String[] { path + "/%",Integer.toString(path.length() + 1), path + "/"});
1021 && path.toLowerCase(Locale.US).endsWith("/.nomedia")) {
1023 String parentPath = path.substring(0, path.lastIndexOf("/"));
1026 Log.e(TAG, "failed to unhide/rescan for " + path);