Klasörler, yalnızca meta veri içeren dosyalardır ve dosyaları düzenlemek için kullanılabilir. Google Drive'da açın. Bunlar aşağıdaki özelliklere sahiptir:
- Klasör, MIME türüne sahip bir dosyadır
application/vnd.google-apps.folder
ve uzantısı yok. root
takma adı, dosya kimliğinin herhangi bir yerinde kök klasöre başvurmak için kullanılabilir sağlanır.
Drive klasör sınırları hakkında daha fazla bilgi için Dosya ve Klasör sınırlamalarını inceleyin.
Bu kılavuzda, klasörle ilgili bazı temel görevlerin nasıl gerçekleştirileceği açıklanmaktadır.
Klasör oluşturma
Klasör oluşturmak için files.create
öğesini kullanın.
application/vnd.google-apps.folder
MIME kullanan yöntem
yazın ve bir başlık ekleyin. Aşağıdaki kod örneğinde
istemci kitaplığını kullanarak nasıl klasör oluşturulur?
Java
Python
Node.js
PHP
.NET
Belirli bir klasörde dosya oluşturma
Belirli bir klasörde dosya oluşturmak için files.create
yöntemini kullanın ve klasör kimliğini
parents
özelliği.
parents
özelliği, dosyayı içeren üst klasörün kimliğini barındırır.
parents
özelliği, üst düzey klasörde veya
başka bir klasör var mı?
Bir dosyanın yalnızca bir tane üst klasörü olabilir. birden fazla üst öğe belirtmek desteklenir.
Aşağıdaki kod örneğinde, istemci kitaplığı:
Java
Python
Node.js
PHP
.NET
Klasörler arasında dosya taşıma
Dosyaları taşımak için parents
özelliğinin kimliğini güncellemeniz gerekir.
Mevcut bir dosyaya üst öğe eklemek veya kaldırmak için files.update
yöntemini addParents
ve
removeParents
sorgu parametresi.
Bir dosyanın yalnızca bir tane üst klasörü olabilir. birden fazla üst öğe belirtmek desteklenir.
Aşağıdaki kod örneğinde, bir istemci kitaplığı:
Java
Python
Node.js
PHP
.NET
Dosya ve klasör sınırları
Drive dosya ve klasörlerinin bazı depolama alanı sınırları vardır.
Kullanıcı öğesi sınırı
Her kullanıcı, o hesap tarafından oluşturulmuş en fazla 500 milyon öğeye sahip olabilir. Bu sınıra ulaşıldığında kullanıcı artık şurada öğe oluşturamaz veya yükleyemez: Drive'a dokunun. Mevcut öğeleri görüntülemeye ve düzenlemeye devam edebilirler. Oluşturmak için dosyaları tekrar yüklemek yerine, kullanıcıların öğeleri kalıcı olarak silmesi veya farklı bir hesap kullanması gerekir. Örneğin, Daha fazla bilgi için Dosyaları çöp kutusuna taşıma veya silme ve klasörleri tıklayın.
Bu sınıra dahil edilen nesneler şunlardır:
- Kullanıcı tarafından Drive'da oluşturulan veya yüklenen öğeler
- Kullanıcı tarafından oluşturulan ancak artık başka birine ait öğeler
- Çöp kutusundaki öğeler
- Kısayollar
- Üçüncü taraf kısayolları
Bu sınıra dahil edilmeyen nesneler şunlardır:
- Kalıcı olarak silinen öğeler
- Kullanıcıyla paylaşılan ancak başkasına ait öğeler
- Kullanıcıya ait olan ancak başkası tarafından oluşturulan öğeler
500 milyondan fazla öğe ekleme girişimleri,
activeItemCreationLimitExceeded
HTTP durum kodu yanıtı.
Bir hizmet hesabının oluşturabileceği öğe sayısıyla ilgili bir sınır olmasa da 500 milyon öğe sınırı, bir hizmet hesabındaki öğe sayısı için geçerlidir. ortaya çıkarmasını sağlamaya yardımcı olur.
Klasör-öğe sınırı
Kullanıcının Drive'ım bölümündeki her klasör 500.000 öğelik sınıra sahiptir. Bu sınır, Drive'ım klasörünün kök klasörü için geçerli değildir. Öğe sayısı şu şekilde hesaba katılır:
- Klasörler
- Dosyalar. Dosya sahipliğinden bağımsız olarak tüm dosya türleri.
- Kısayollar'a dokunun. Bir klasör içindeki tek bir öğe olarak sayılır, bu öğe için geçerli olsa bile bulunduğu klasör bu klasör içinde yer almaz. Daha fazla bilgi için kısayolu kullanabilirsiniz.
- Üçüncü taraf kısayolları. Bir klasör içinde tek bir öğe olarak sayılır, işaret ettiği öğenin o klasör içinde olmaması gerekir. Daha fazla bilgi için bkz. Google Cloud Platform'da depoladığınız içeriğe ait uygulamasında gösterilir.
Klasör sınırlamaları hakkında daha fazla bilgi için Google Drive'a gidin.
Klasör derinliği sınırı
Kullanıcının Drive'ım alanında 100'den fazla iç içe yerleştirilmiş düzey bulunamaz
klasörlerini tıklayın. Yani bir alt klasörün, aynı klasördeki bir klasör
derinliğinde büyük bir başarı yakalamayı başarıyor. Bu sınırlama yalnızca alt klasörler için geçerlidir. Çocuk
farklı bir MIME türüne sahip dosya
application/vnd.google-apps.folder
bu sınırlamadan muaftır.
Örneğin, aşağıdaki diyagramda yeni bir klasör, klasör içine 100 numaralı klasörün içinde değil 99 numarada. Ancak, 100 numaralı klasör diğer Drive klasörlerindeki gibi dosyalar:
100'den fazla klasör düzeyi ekleme girişimlerinde
myDriveHierarchyDepthLimitExceeded
HTTP durum kodu yanıtı.